38 #include "../include/solver_structure.hpp"
172 unsigned long iPoint, counter_local = 0, counter_global = 0, iVertex;
173 unsigned short iVar, iDim, iMarker, nLineLets;
174 su2double StaticEnergy, Density, Velocity2, Pressure, Temperature;
175 unsigned short nZone = geometry->
GetnZone();
180 int Unst_RestartIter;
181 unsigned short iZone = config->
GetiZone();
196 if (!(!restart || (iMesh !=
MESH_0) || nZone > 1)) {
377 for (iMarker = 0; iMarker <
nMarker; iMarker++)
404 for (iVar = 0; iVar <
nVar; iVar++) {
442 if (roe_turkel || low_mach_prec) {
444 for (iVar = 0; iVar <
nVar; iVar ++)
461 for (iVar = 0; iVar <
nVar; iVar++) {
466 if (
rank ==
MASTER_NODE) cout <<
"Initialize Jacobian structure (Euler). MG level: " << iMesh <<
"." << endl;
472 if (
rank ==
MASTER_NODE) cout <<
"Compute linelet structure. " << nLineLets <<
" elements in each line (average)." << endl;
478 if (
rank ==
MASTER_NODE) cout <<
"Explicit scheme. No Jacobian structure (Euler). MG level: " << iMesh <<
"." << endl;
488 for (iDim = 0; iDim <
nDim; iDim++)
500 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
502 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
504 for (iVar = 0; iVar <
nPrimVar; iVar++) {
514 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
516 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
519 for (iVar = 0; iVar <
nPrimVar + 2 ; iVar++) {
525 for (iVar = 0; iVar <
nPrimVar ; iVar++) {
535 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
537 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
545 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
547 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
555 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
557 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
565 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
567 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
575 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
577 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
585 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
587 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
589 for (iDim = 0; iDim <
nDim; iDim++) {
599 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
602 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
731 switch(direct_diff) {
756 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
773 for (iMarker = 0; iMarker <
nMarker; iMarker++){
782 for (iPoint = 0; iPoint < geometry->
GetnVertex(iMarker); iPoint++){
786 for (iVar = 0; iVar <
nPrimVar+1; iVar++)
795 for (iPoint = 0; iPoint <
nPoint; iPoint++)
802 for (iPoint = 0; iPoint <
nPoint; iPoint++) {
807 for (iDim = 0; iDim <
nDim; iDim++)
808 Velocity2 += (
node[iPoint]->GetSolution(iDim+1)/Density)*(
node[iPoint]->
GetSolution(iDim+1)/Density);
818 if ((Pressure < 0.0) || (Density < 0.0) || (Temperature < 0.0)) {
820 for (iDim = 0; iDim <
nDim; iDim++)
839 for (iVar = 0; iVar <
nVar; iVar++) {
855 counter_global = counter_local;
858 cout <<
"Warning. The original solution contains "<< counter_global <<
" points that are not physical." << endl;
880 unsigned short iVar, iMarker, iSpan;
882 unsigned long iVertex;
898 if (
Cmu != NULL)
delete []
Cmu;
982 for (iVar = 0; iVar <
nVar; iVar ++)
988 for (iMarker = 0; iMarker <
nMarker; iMarker++)
994 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1000 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1001 for (iVertex = 0; iVertex <
nVertex[iMarker]; iVertex++)
1009 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1011 for (iVertex = 0; iVertex <
nVertex[iMarker]; iVertex++)
1013 for (iVar = 0; iVar <
nPrimVar+1; iVar++)
1024 for (iMarker = 0; iMarker <
nMarker; iMarker++){
1032 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1033 for (iVertex = 0; iVertex <
nVertex[iMarker]; iVertex++)
1041 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1047 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1053 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1059 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1066 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1073 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1075 for (iVertex = 0; iVertex <
nVertex[iMarker]; iVertex++)
1086 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1093 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1099 if (
YPlus != NULL) {
1100 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1101 delete []
YPlus[iMarker];
1111 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1120 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1129 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1138 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1148 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1157 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1166 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1172 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1178 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1184 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1190 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1196 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1202 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1208 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1214 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1220 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1226 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1232 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1238 for (iMarker = 0; iMarker <
nMarker; iMarker++)
1245 for (iSpan = 0; iSpan <
nSpanMax + 1; iSpan++){
1255 for (iSpan = 0; iSpan <
nSpanMax + 1; iSpan++){
1289 delete []
KineIn[iMarker];
1301 delete []
NuIn[iMarker];
1319 delete []
NuOut[iMarker];
1324 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1326 delete []
CkInflow[iMarker][iSpan];
1333 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1342 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1353 unsigned short iMarker, iSpan, iDim, iVar;
1381 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1423 for (iDim = 0; iDim <
nDim; iDim++) {
1430 for (iVar = 0; iVar <
nVar; iVar++) {
1471 for (iSpan = 0; iSpan <
nSpanMax + 1; iSpan++){
1478 KineIn[iMarker][iSpan] = 0.0;
1479 OmegaIn[iMarker][iSpan] = 0.0;
1480 NuIn[iMarker][iSpan] = 0.0;
1481 KineOut[iMarker][iSpan] = 0.0;
1483 NuOut[iMarker][iSpan] = 0.0;
1485 for (iDim = 0; iDim <
nDim; iDim++){
1501 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1512 CkInflow[iMarker][iSpan][iVar]= complex<su2double>(0.0,0.0);
1516 CkOutflow1[iMarker][iSpan][iVar]= complex<su2double>(0.0,0.0);
1517 CkOutflow2[iMarker][iSpan][iVar]= complex<su2double>(0.0,0.0);
1527 unsigned short iVar, iMarker, iPeriodic_Index, MarkerS, MarkerR;
1528 unsigned long iVertex, iPoint, nVertexS, nVertexR, nBufferS_Vector, nBufferR_Vector;
1529 su2double rotMatrix[3][3], *angles, theta, cosTheta, sinTheta, phi, cosPhi, sinPhi, psi, cosPsi, sinPsi, *Buffer_Receive_U = NULL, *Buffer_Send_U = NULL;
1532 int send_to, receive_from;
1536 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1541 MarkerS = iMarker; MarkerR = iMarker+1;
1548 nVertexS = geometry->
nVertex[MarkerS]; nVertexR = geometry->
nVertex[MarkerR];
1549 nBufferS_Vector = nVertexS*
nVar; nBufferR_Vector = nVertexR*
nVar;
1552 Buffer_Receive_U =
new su2double [nBufferR_Vector];
1553 Buffer_Send_U =
new su2double[nBufferS_Vector];
1556 for (iVertex = 0; iVertex < nVertexS; iVertex++) {
1558 for (iVar = 0; iVar <
nVar; iVar++)
1559 Buffer_Send_U[iVar*nVertexS+iVertex] =
node[iPoint]->GetSolution(iVar);
1571 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
1572 for (iVar = 0; iVar <
nVar; iVar++)
1573 Buffer_Receive_U[iVar*nVertexR+iVertex] = Buffer_Send_U[iVar*nVertexR+iVertex];
1579 delete [] Buffer_Send_U;
1582 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
1592 theta = angles[0]; phi = angles[1]; psi = angles[2];
1593 cosTheta = cos(theta); cosPhi = cos(phi); cosPsi = cos(psi);
1594 sinTheta = sin(theta); sinPhi = sin(phi); sinPsi = sin(psi);
1600 rotMatrix[0][0] = cosPhi*cosPsi; rotMatrix[1][0] = sinTheta*sinPhi*cosPsi - cosTheta*sinPsi; rotMatrix[2][0] = cosTheta*sinPhi*cosPsi + sinTheta*sinPsi;
1601 rotMatrix[0][1] = cosPhi*sinPsi; rotMatrix[1][1] = sinTheta*sinPhi*sinPsi + cosTheta*cosPsi; rotMatrix[2][1] = cosTheta*sinPhi*sinPsi - sinTheta*cosPsi;
1602 rotMatrix[0][2] = -sinPhi; rotMatrix[1][2] = sinTheta*cosPhi; rotMatrix[2][2] = cosTheta*cosPhi;
1605 for (iVar = 0; iVar <
nVar; iVar++)
1606 Solution[iVar] = Buffer_Receive_U[iVar*nVertexR+iVertex];
1610 Solution[1] = rotMatrix[0][0]*Buffer_Receive_U[1*nVertexR+iVertex] +
1611 rotMatrix[0][1]*Buffer_Receive_U[2*nVertexR+iVertex];
1612 Solution[2] = rotMatrix[1][0]*Buffer_Receive_U[1*nVertexR+iVertex] +
1613 rotMatrix[1][1]*Buffer_Receive_U[2*nVertexR+iVertex];
1616 Solution[1] = rotMatrix[0][0]*Buffer_Receive_U[1*nVertexR+iVertex] +
1617 rotMatrix[0][1]*Buffer_Receive_U[2*nVertexR+iVertex] +
1618 rotMatrix[0][2]*Buffer_Receive_U[3*nVertexR+iVertex];
1619 Solution[2] = rotMatrix[1][0]*Buffer_Receive_U[1*nVertexR+iVertex] +
1620 rotMatrix[1][1]*Buffer_Receive_U[2*nVertexR+iVertex] +
1621 rotMatrix[1][2]*Buffer_Receive_U[3*nVertexR+iVertex];
1622 Solution[3] = rotMatrix[2][0]*Buffer_Receive_U[1*nVertexR+iVertex] +
1623 rotMatrix[2][1]*Buffer_Receive_U[2*nVertexR+iVertex] +
1624 rotMatrix[2][2]*Buffer_Receive_U[3*nVertexR+iVertex];
1628 for (iVar = 0; iVar <
nVar; iVar++)
1634 delete [] Buffer_Receive_U;
1643 unsigned short iVar, iMarker, iPeriodic_Index, MarkerS, MarkerR;
1644 unsigned long iVertex, iPoint, nVertexS, nVertexR, nBufferS_Vector, nBufferR_Vector;
1645 su2double rotMatrix[3][3], *angles, theta, cosTheta, sinTheta, phi, cosPhi, sinPhi, psi, cosPsi, sinPsi,
1646 *Buffer_Receive_U = NULL, *Buffer_Send_U = NULL;
1649 int send_to, receive_from;
1653 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1658 MarkerS = iMarker; MarkerR = iMarker+1;
1665 nVertexS = geometry->
nVertex[MarkerS]; nVertexR = geometry->
nVertex[MarkerR];
1666 nBufferS_Vector = nVertexS*
nVar; nBufferR_Vector = nVertexR*
nVar;
1669 Buffer_Receive_U =
new su2double [nBufferR_Vector];
1670 Buffer_Send_U =
new su2double[nBufferS_Vector];
1673 for (iVertex = 0; iVertex < nVertexS; iVertex++) {
1675 for (iVar = 0; iVar <
nVar; iVar++)
1676 Buffer_Send_U[iVar*nVertexS+iVertex] =
node[iPoint]->GetSolution_Old(iVar);
1688 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
1689 for (iVar = 0; iVar <
nVar; iVar++)
1690 Buffer_Receive_U[iVar*nVertexR+iVertex] = Buffer_Send_U[iVar*nVertexR+iVertex];
1696 delete [] Buffer_Send_U;
1699 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
1709 theta = angles[0]; phi = angles[1]; psi = angles[2];
1710 cosTheta = cos(theta); cosPhi = cos(phi); cosPsi = cos(psi);
1711 sinTheta = sin(theta); sinPhi = sin(phi); sinPsi = sin(psi);
1717 rotMatrix[0][0] = cosPhi*cosPsi; rotMatrix[1][0] = sinTheta*sinPhi*cosPsi - cosTheta*sinPsi; rotMatrix[2][0] = cosTheta*sinPhi*cosPsi + sinTheta*sinPsi;
1718 rotMatrix[0][1] = cosPhi*sinPsi; rotMatrix[1][1] = sinTheta*sinPhi*sinPsi + cosTheta*cosPsi; rotMatrix[2][1] = cosTheta*sinPhi*sinPsi - sinTheta*cosPsi;
1719 rotMatrix[0][2] = -sinPhi; rotMatrix[1][2] = sinTheta*cosPhi; rotMatrix[2][2] = cosTheta*cosPhi;
1722 for (iVar = 0; iVar <
nVar; iVar++)
1723 Solution[iVar] = Buffer_Receive_U[iVar*nVertexR+iVertex];
1727 Solution[1] = rotMatrix[0][0]*Buffer_Receive_U[1*nVertexR+iVertex] +
1728 rotMatrix[0][1]*Buffer_Receive_U[2*nVertexR+iVertex];
1729 Solution[2] = rotMatrix[1][0]*Buffer_Receive_U[1*nVertexR+iVertex] +
1730 rotMatrix[1][1]*Buffer_Receive_U[2*nVertexR+iVertex];
1733 Solution[1] = rotMatrix[0][0]*Buffer_Receive_U[1*nVertexR+iVertex] +
1734 rotMatrix[0][1]*Buffer_Receive_U[2*nVertexR+iVertex] +
1735 rotMatrix[0][2]*Buffer_Receive_U[3*nVertexR+iVertex];
1736 Solution[2] = rotMatrix[1][0]*Buffer_Receive_U[1*nVertexR+iVertex] +
1737 rotMatrix[1][1]*Buffer_Receive_U[2*nVertexR+iVertex] +
1738 rotMatrix[1][2]*Buffer_Receive_U[3*nVertexR+iVertex];
1739 Solution[3] = rotMatrix[2][0]*Buffer_Receive_U[1*nVertexR+iVertex] +
1740 rotMatrix[2][1]*Buffer_Receive_U[2*nVertexR+iVertex] +
1741 rotMatrix[2][2]*Buffer_Receive_U[3*nVertexR+iVertex];
1745 for (iVar = 0; iVar <
nVar; iVar++)
1751 delete [] Buffer_Receive_U;
1759 unsigned short iVar, iMarker, iPeriodic_Index, MarkerS, MarkerR;
1760 unsigned long iVertex, iPoint, nVertexS, nVertexR, nBufferS_Vector, nBufferR_Vector;
1761 su2double rotMatrix[3][3], *angles, theta, cosTheta, sinTheta, phi, cosPhi, sinPhi, psi, cosPsi, sinPsi,
1762 *Buffer_Receive_Undivided_Laplacian = NULL, *Buffer_Send_Undivided_Laplacian = NULL;
1765 int send_to, receive_from;
1769 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1774 MarkerS = iMarker; MarkerR = iMarker+1;
1781 nVertexS = geometry->
nVertex[MarkerS]; nVertexR = geometry->
nVertex[MarkerR];
1782 nBufferS_Vector = nVertexS*
nVar; nBufferR_Vector = nVertexR*
nVar;
1785 Buffer_Receive_Undivided_Laplacian =
new su2double [nBufferR_Vector];
1786 Buffer_Send_Undivided_Laplacian =
new su2double[nBufferS_Vector];
1789 for (iVertex = 0; iVertex < nVertexS; iVertex++) {
1791 for (iVar = 0; iVar <
nVar; iVar++)
1792 Buffer_Send_Undivided_Laplacian[iVar*nVertexS+iVertex] =
node[iPoint]->GetUndivided_Laplacian(iVar);
1804 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
1805 for (iVar = 0; iVar <
nVar; iVar++)
1806 Buffer_Receive_Undivided_Laplacian[iVar*nVertexR+iVertex] = Buffer_Send_Undivided_Laplacian[iVar*nVertexR+iVertex];
1812 delete [] Buffer_Send_Undivided_Laplacian;
1815 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
1825 theta = angles[0]; phi = angles[1]; psi = angles[2];
1826 cosTheta = cos(theta); cosPhi = cos(phi); cosPsi = cos(psi);
1827 sinTheta = sin(theta); sinPhi = sin(phi); sinPsi = sin(psi);
1833 rotMatrix[0][0] = cosPhi*cosPsi; rotMatrix[1][0] = sinTheta*sinPhi*cosPsi - cosTheta*sinPsi; rotMatrix[2][0] = cosTheta*sinPhi*cosPsi + sinTheta*sinPsi;
1834 rotMatrix[0][1] = cosPhi*sinPsi; rotMatrix[1][1] = sinTheta*sinPhi*sinPsi + cosTheta*cosPsi; rotMatrix[2][1] = cosTheta*sinPhi*sinPsi - sinTheta*cosPsi;
1835 rotMatrix[0][2] = -sinPhi; rotMatrix[1][2] = sinTheta*cosPhi; rotMatrix[2][2] = cosTheta*cosPhi;
1838 for (iVar = 0; iVar <
nVar; iVar++)
1839 Solution[iVar] = Buffer_Receive_Undivided_Laplacian[iVar*nVertexR+iVertex];
1843 Solution[1] = rotMatrix[0][0]*Buffer_Receive_Undivided_Laplacian[1*nVertexR+iVertex] +
1844 rotMatrix[0][1]*Buffer_Receive_Undivided_Laplacian[2*nVertexR+iVertex];
1845 Solution[2] = rotMatrix[1][0]*Buffer_Receive_Undivided_Laplacian[1*nVertexR+iVertex] +
1846 rotMatrix[1][1]*Buffer_Receive_Undivided_Laplacian[2*nVertexR+iVertex];
1849 Solution[1] = rotMatrix[0][0]*Buffer_Receive_Undivided_Laplacian[1*nVertexR+iVertex] +
1850 rotMatrix[0][1]*Buffer_Receive_Undivided_Laplacian[2*nVertexR+iVertex] +
1851 rotMatrix[0][2]*Buffer_Receive_Undivided_Laplacian[3*nVertexR+iVertex];
1852 Solution[2] = rotMatrix[1][0]*Buffer_Receive_Undivided_Laplacian[1*nVertexR+iVertex] +
1853 rotMatrix[1][1]*Buffer_Receive_Undivided_Laplacian[2*nVertexR+iVertex] +
1854 rotMatrix[1][2]*Buffer_Receive_Undivided_Laplacian[3*nVertexR+iVertex];
1855 Solution[3] = rotMatrix[2][0]*Buffer_Receive_Undivided_Laplacian[1*nVertexR+iVertex] +
1856 rotMatrix[2][1]*Buffer_Receive_Undivided_Laplacian[2*nVertexR+iVertex] +
1857 rotMatrix[2][2]*Buffer_Receive_Undivided_Laplacian[3*nVertexR+iVertex];
1861 for (iVar = 0; iVar <
nVar; iVar++)
1867 delete [] Buffer_Receive_Undivided_Laplacian;
1876 unsigned short iMarker, MarkerS, MarkerR, *Buffer_Receive_Neighbor = NULL, *Buffer_Send_Neighbor = NULL;
1877 unsigned long iVertex, iPoint, nVertexS, nVertexR, nBufferS_Vector, nBufferR_Vector;
1878 su2double *Buffer_Receive_Lambda = NULL, *Buffer_Send_Lambda = NULL;
1881 int send_to, receive_from;
1885 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1890 MarkerS = iMarker; MarkerR = iMarker+1;
1897 nVertexS = geometry->
nVertex[MarkerS]; nVertexR = geometry->
nVertex[MarkerR];
1898 nBufferS_Vector = nVertexS; nBufferR_Vector = nVertexR;
1901 Buffer_Receive_Lambda =
new su2double [nBufferR_Vector];
1902 Buffer_Send_Lambda =
new su2double[nBufferS_Vector];
1903 Buffer_Receive_Neighbor =
new unsigned short [nBufferR_Vector];
1904 Buffer_Send_Neighbor =
new unsigned short[nBufferS_Vector];
1907 for (iVertex = 0; iVertex < nVertexS; iVertex++) {
1910 Buffer_Send_Neighbor[iVertex] = geometry->
node[iPoint]->
GetnPoint();
1924 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
1925 Buffer_Receive_Lambda[iVertex] = Buffer_Send_Lambda[iVertex];
1926 Buffer_Receive_Neighbor[iVertex] = Buffer_Send_Neighbor[iVertex];
1932 delete [] Buffer_Send_Lambda;
1933 delete [] Buffer_Send_Neighbor;
1936 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
1946 delete [] Buffer_Receive_Lambda;
1947 delete [] Buffer_Receive_Neighbor;
1955 unsigned short iMarker, MarkerS, MarkerR;
1956 unsigned long iVertex, iPoint, nVertexS, nVertexR, nBufferS_Vector, nBufferR_Vector;
1957 su2double *Buffer_Receive_Lambda = NULL, *Buffer_Send_Lambda = NULL;
1960 int send_to, receive_from;
1964 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
1969 MarkerS = iMarker; MarkerR = iMarker+1;
1976 nVertexS = geometry->
nVertex[MarkerS]; nVertexR = geometry->
nVertex[MarkerR];
1977 nBufferS_Vector = nVertexS; nBufferR_Vector = nVertexR;
1980 Buffer_Receive_Lambda =
new su2double [nBufferR_Vector];
1981 Buffer_Send_Lambda =
new su2double[nBufferS_Vector];
1984 for (iVertex = 0; iVertex < nVertexS; iVertex++) {
1998 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
1999 Buffer_Receive_Lambda[iVertex] = Buffer_Send_Lambda[iVertex];
2005 delete [] Buffer_Send_Lambda;
2008 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
2017 delete [] Buffer_Receive_Lambda;
2025 unsigned short iVar, iDim, iMarker, iPeriodic_Index, MarkerS, MarkerR;
2026 unsigned long iVertex, iPoint, nVertexS, nVertexR, nBufferS_Vector, nBufferR_Vector;
2027 su2double rotMatrix[3][3], *angles, theta, cosTheta, sinTheta, phi, cosPhi, sinPhi, psi, cosPsi, sinPsi,
2028 *Buffer_Receive_Gradient = NULL, *Buffer_Send_Gradient = NULL;
2031 for (iVar = 0; iVar <
nVar; iVar++)
2035 int send_to, receive_from;
2039 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
2044 MarkerS = iMarker; MarkerR = iMarker+1;
2051 nVertexS = geometry->
nVertex[MarkerS]; nVertexR = geometry->
nVertex[MarkerR];
2052 nBufferS_Vector = nVertexS*
nVar*
nDim; nBufferR_Vector = nVertexR*
nVar*
nDim;
2055 Buffer_Receive_Gradient =
new su2double [nBufferR_Vector];
2056 Buffer_Send_Gradient =
new su2double[nBufferS_Vector];
2059 for (iVertex = 0; iVertex < nVertexS; iVertex++) {
2061 for (iVar = 0; iVar <
nVar; iVar++)
2062 for (iDim = 0; iDim <
nDim; iDim++)
2063 Buffer_Send_Gradient[iDim*
nVar*nVertexS+iVar*nVertexS+iVertex] =
node[iPoint]->GetGradient(iVar, iDim);
2075 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
2076 for (iVar = 0; iVar <
nVar; iVar++)
2077 for (iDim = 0; iDim <
nDim; iDim++)
2078 Buffer_Receive_Gradient[iDim*
nVar*nVertexR+iVar*nVertexR+iVertex] = Buffer_Send_Gradient[iDim*
nVar*nVertexR+iVar*nVertexR+iVertex];
2084 delete [] Buffer_Send_Gradient;
2087 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
2097 theta = angles[0]; phi = angles[1]; psi = angles[2];
2098 cosTheta = cos(theta); cosPhi = cos(phi); cosPsi = cos(psi);
2099 sinTheta = sin(theta); sinPhi = sin(phi); sinPsi = sin(psi);
2105 rotMatrix[0][0] = cosPhi*cosPsi; rotMatrix[1][0] = sinTheta*sinPhi*cosPsi - cosTheta*sinPsi; rotMatrix[2][0] = cosTheta*sinPhi*cosPsi + sinTheta*sinPsi;
2106 rotMatrix[0][1] = cosPhi*sinPsi; rotMatrix[1][1] = sinTheta*sinPhi*sinPsi + cosTheta*cosPsi; rotMatrix[2][1] = cosTheta*sinPhi*sinPsi - sinTheta*cosPsi;
2107 rotMatrix[0][2] = -sinPhi; rotMatrix[1][2] = sinTheta*cosPhi; rotMatrix[2][2] = cosTheta*cosPhi;
2110 for (iVar = 0; iVar <
nVar; iVar++)
2111 for (iDim = 0; iDim <
nDim; iDim++)
2112 Gradient[iVar][iDim] = Buffer_Receive_Gradient[iDim*
nVar*nVertexR+iVar*nVertexR+iVertex];
2115 for (iVar = 0; iVar <
nVar; iVar++) {
2117 Gradient[iVar][0] = rotMatrix[0][0]*Buffer_Receive_Gradient[0*
nVar*nVertexR+iVar*nVertexR+iVertex] + rotMatrix[0][1]*Buffer_Receive_Gradient[1*
nVar*nVertexR+iVar*nVertexR+iVertex];
2118 Gradient[iVar][1] = rotMatrix[1][0]*Buffer_Receive_Gradient[0*
nVar*nVertexR+iVar*nVertexR+iVertex] + rotMatrix[1][1]*Buffer_Receive_Gradient[1*
nVar*nVertexR+iVar*nVertexR+iVertex];
2121 Gradient[iVar][0] = rotMatrix[0][0]*Buffer_Receive_Gradient[0*
nVar*nVertexR+iVar*nVertexR+iVertex] + rotMatrix[0][1]*Buffer_Receive_Gradient[1*
nVar*nVertexR+iVar*nVertexR+iVertex] + rotMatrix[0][2]*Buffer_Receive_Gradient[2*
nVar*nVertexR+iVar*nVertexR+iVertex];
2122 Gradient[iVar][1] = rotMatrix[1][0]*Buffer_Receive_Gradient[0*
nVar*nVertexR+iVar*nVertexR+iVertex] + rotMatrix[1][1]*Buffer_Receive_Gradient[1*
nVar*nVertexR+iVar*nVertexR+iVertex] + rotMatrix[1][2]*Buffer_Receive_Gradient[2*
nVar*nVertexR+iVar*nVertexR+iVertex];
2123 Gradient[iVar][2] = rotMatrix[2][0]*Buffer_Receive_Gradient[0*
nVar*nVertexR+iVar*nVertexR+iVertex] + rotMatrix[2][1]*Buffer_Receive_Gradient[1*
nVar*nVertexR+iVar*nVertexR+iVertex] + rotMatrix[2][2]*Buffer_Receive_Gradient[2*
nVar*nVertexR+iVar*nVertexR+iVertex];
2128 for (iVar = 0; iVar <
nVar; iVar++)
2129 for (iDim = 0; iDim <
nDim; iDim++)
2130 node[iPoint]->SetGradient(iVar, iDim, Gradient[iVar][iDim]);
2135 delete [] Buffer_Receive_Gradient;
2141 for (iVar = 0; iVar <
nVar; iVar++)
2142 delete [] Gradient[iVar];
2148 unsigned short iVar, iMarker, iPeriodic_Index, MarkerS, MarkerR;
2149 unsigned long iVertex, iPoint, nVertexS, nVertexR, nBufferS_Vector, nBufferR_Vector;
2150 su2double rotMatrix[3][3], *angles, theta, cosTheta, sinTheta, phi, cosPhi, sinPhi, psi, cosPsi, sinPsi,
2151 *Buffer_Receive_Limit = NULL, *Buffer_Send_Limit = NULL;
2156 int send_to, receive_from;
2160 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
2165 MarkerS = iMarker; MarkerR = iMarker+1;
2172 nVertexS = geometry->
nVertex[MarkerS]; nVertexR = geometry->
nVertex[MarkerR];
2173 nBufferS_Vector = nVertexS*
nVar; nBufferR_Vector = nVertexR*
nVar;
2176 Buffer_Receive_Limit =
new su2double [nBufferR_Vector];
2177 Buffer_Send_Limit =
new su2double[nBufferS_Vector];
2180 for (iVertex = 0; iVertex < nVertexS; iVertex++) {
2182 for (iVar = 0; iVar <
nVar; iVar++)
2183 Buffer_Send_Limit[iVar*nVertexS+iVertex] =
node[iPoint]->GetLimiter(iVar);
2195 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
2196 for (iVar = 0; iVar <
nVar; iVar++)
2197 Buffer_Receive_Limit[iVar*nVertexR+iVertex] = Buffer_Send_Limit[iVar*nVertexR+iVertex];
2203 delete [] Buffer_Send_Limit;
2206 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
2216 theta = angles[0]; phi = angles[1]; psi = angles[2];
2217 cosTheta = cos(theta); cosPhi = cos(phi); cosPsi = cos(psi);
2218 sinTheta = sin(theta); sinPhi = sin(phi); sinPsi = sin(psi);
2224 rotMatrix[0][0] = cosPhi*cosPsi; rotMatrix[1][0] = sinTheta*sinPhi*cosPsi - cosTheta*sinPsi; rotMatrix[2][0] = cosTheta*sinPhi*cosPsi + sinTheta*sinPsi;
2225 rotMatrix[0][1] = cosPhi*sinPsi; rotMatrix[1][1] = sinTheta*sinPhi*sinPsi + cosTheta*cosPsi; rotMatrix[2][1] = cosTheta*sinPhi*sinPsi - sinTheta*cosPsi;
2226 rotMatrix[0][2] = -sinPhi; rotMatrix[1][2] = sinTheta*cosPhi; rotMatrix[2][2] = cosTheta*cosPhi;
2229 for (iVar = 0; iVar <
nVar; iVar++)
2230 Limiter[iVar] = Buffer_Receive_Limit[iVar*nVertexR+iVertex];
2234 Limiter[1] = rotMatrix[0][0]*Buffer_Receive_Limit[1*nVertexR+iVertex] +
2235 rotMatrix[0][1]*Buffer_Receive_Limit[2*nVertexR+iVertex];
2236 Limiter[2] = rotMatrix[1][0]*Buffer_Receive_Limit[1*nVertexR+iVertex] +
2237 rotMatrix[1][1]*Buffer_Receive_Limit[2*nVertexR+iVertex];
2240 Limiter[1] = rotMatrix[0][0]*Buffer_Receive_Limit[1*nVertexR+iVertex] +
2241 rotMatrix[0][1]*Buffer_Receive_Limit[2*nVertexR+iVertex] +
2242 rotMatrix[0][2]*Buffer_Receive_Limit[3*nVertexR+iVertex];
2243 Limiter[2] = rotMatrix[1][0]*Buffer_Receive_Limit[1*nVertexR+iVertex] +
2244 rotMatrix[1][1]*Buffer_Receive_Limit[2*nVertexR+iVertex] +
2245 rotMatrix[1][2]*Buffer_Receive_Limit[3*nVertexR+iVertex];
2246 Limiter[3] = rotMatrix[2][0]*Buffer_Receive_Limit[1*nVertexR+iVertex] +
2247 rotMatrix[2][1]*Buffer_Receive_Limit[2*nVertexR+iVertex] +
2248 rotMatrix[2][2]*Buffer_Receive_Limit[3*nVertexR+iVertex];
2252 for (iVar = 0; iVar <
nVar; iVar++)
2253 node[iPoint]->SetLimiter(iVar, Limiter[iVar]);
2258 delete [] Buffer_Receive_Limit;
2269 unsigned short iVar, iDim, iMarker, iPeriodic_Index, MarkerS, MarkerR;
2270 unsigned long iVertex, iPoint, nVertexS, nVertexR, nBufferS_Vector, nBufferR_Vector;
2271 su2double rotMatrix[3][3], *angles, theta, cosTheta, sinTheta, phi, cosPhi, sinPhi, psi, cosPsi, sinPsi,
2272 *Buffer_Receive_Gradient = NULL, *Buffer_Send_Gradient = NULL;
2279 int send_to, receive_from;
2283 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
2288 MarkerS = iMarker; MarkerR = iMarker+1;
2295 nVertexS = geometry->
nVertex[MarkerS]; nVertexR = geometry->
nVertex[MarkerR];
2299 Buffer_Receive_Gradient =
new su2double [nBufferR_Vector];
2300 Buffer_Send_Gradient =
new su2double[nBufferS_Vector];
2303 for (iVertex = 0; iVertex < nVertexS; iVertex++) {
2306 for (iDim = 0; iDim <
nDim; iDim++)
2307 Buffer_Send_Gradient[iDim*
nPrimVarGrad*nVertexS+iVar*nVertexS+iVertex] =
node[iPoint]->GetGradient_Primitive(iVar, iDim);
2319 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
2321 for (iDim = 0; iDim <
nDim; iDim++)
2322 Buffer_Receive_Gradient[iDim*
nPrimVarGrad*nVertexR+iVar*nVertexR+iVertex] = Buffer_Send_Gradient[iDim*
nPrimVarGrad*nVertexR+iVar*nVertexR+iVertex];
2328 delete [] Buffer_Send_Gradient;
2331 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
2341 theta = angles[0]; phi = angles[1]; psi = angles[2];
2342 cosTheta = cos(theta); cosPhi = cos(phi); cosPsi = cos(psi);
2343 sinTheta = sin(theta); sinPhi = sin(phi); sinPsi = sin(psi);
2349 rotMatrix[0][0] = cosPhi*cosPsi; rotMatrix[1][0] = sinTheta*sinPhi*cosPsi - cosTheta*sinPsi; rotMatrix[2][0] = cosTheta*sinPhi*cosPsi + sinTheta*sinPsi;
2350 rotMatrix[0][1] = cosPhi*sinPsi; rotMatrix[1][1] = sinTheta*sinPhi*sinPsi + cosTheta*cosPsi; rotMatrix[2][1] = cosTheta*sinPhi*sinPsi - sinTheta*cosPsi;
2351 rotMatrix[0][2] = -sinPhi; rotMatrix[1][2] = sinTheta*cosPhi; rotMatrix[2][2] = cosTheta*cosPhi;
2355 for (iDim = 0; iDim <
nDim; iDim++)
2356 Gradient[iVar][iDim] = Buffer_Receive_Gradient[iDim*
nPrimVarGrad*nVertexR+iVar*nVertexR+iVertex];
2361 Gradient[iVar][0] = rotMatrix[0][0]*Buffer_Receive_Gradient[0*
nPrimVarGrad*nVertexR+iVar*nVertexR+iVertex] + rotMatrix[0][1]*Buffer_Receive_Gradient[1*
nPrimVarGrad*nVertexR+iVar*nVertexR+iVertex];
2362 Gradient[iVar][1] = rotMatrix[1][0]*Buffer_Receive_Gradient[0*
nPrimVarGrad*nVertexR+iVar*nVertexR+iVertex] + rotMatrix[1][1]*Buffer_Receive_Gradient[1*
nPrimVarGrad*nVertexR+iVar*nVertexR+iVertex];
2365 Gradient[iVar][0] = rotMatrix[0][0]*Buffer_Receive_Gradient[0*
nPrimVarGrad*nVertexR+iVar*nVertexR+iVertex] + rotMatrix[0][1]*Buffer_Receive_Gradient[1*
nPrimVarGrad*nVertexR+iVar*nVertexR+iVertex] + rotMatrix[0][2]*Buffer_Receive_Gradient[2*
nPrimVarGrad*nVertexR+iVar*nVertexR+iVertex];
2366 Gradient[iVar][1] = rotMatrix[1][0]*Buffer_Receive_Gradient[0*
nPrimVarGrad*nVertexR+iVar*nVertexR+iVertex] + rotMatrix[1][1]*Buffer_Receive_Gradient[1*
nPrimVarGrad*nVertexR+iVar*nVertexR+iVertex] + rotMatrix[1][2]*Buffer_Receive_Gradient[2*
nPrimVarGrad*nVertexR+iVar*nVertexR+iVertex];
2367 Gradient[iVar][2] = rotMatrix[2][0]*Buffer_Receive_Gradient[0*
nPrimVarGrad*nVertexR+iVar*nVertexR+iVertex] + rotMatrix[2][1]*Buffer_Receive_Gradient[1*
nPrimVarGrad*nVertexR+iVar*nVertexR+iVertex] + rotMatrix[2][2]*Buffer_Receive_Gradient[2*
nPrimVarGrad*nVertexR+iVar*nVertexR+iVertex];
2373 for (iDim = 0; iDim <
nDim; iDim++)
2374 node[iPoint]->SetGradient_Primitive(iVar, iDim, Gradient[iVar][iDim]);
2379 delete [] Buffer_Receive_Gradient;
2386 delete [] Gradient[iVar];
2392 unsigned short iVar, iMarker, iPeriodic_Index, MarkerS, MarkerR;
2393 unsigned long iVertex, iPoint, nVertexS, nVertexR, nBufferS_Vector, nBufferR_Vector;
2394 su2double rotMatrix[3][3], *angles, theta, cosTheta, sinTheta, phi, cosPhi, sinPhi, psi, cosPsi, sinPsi,
2395 *Buffer_Receive_Limit = NULL, *Buffer_Send_Limit = NULL;
2400 int send_to, receive_from;
2404 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
2409 MarkerS = iMarker; MarkerR = iMarker+1;
2416 nVertexS = geometry->
nVertex[MarkerS]; nVertexR = geometry->
nVertex[MarkerR];
2420 Buffer_Receive_Limit =
new su2double [nBufferR_Vector];
2421 Buffer_Send_Limit =
new su2double[nBufferS_Vector];
2424 for (iVertex = 0; iVertex < nVertexS; iVertex++) {
2427 Buffer_Send_Limit[iVar*nVertexS+iVertex] =
node[iPoint]->GetLimiter_Primitive(iVar);
2439 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
2441 Buffer_Receive_Limit[iVar*nVertexR+iVertex] = Buffer_Send_Limit[iVar*nVertexR+iVertex];
2447 delete [] Buffer_Send_Limit;
2450 for (iVertex = 0; iVertex < nVertexR; iVertex++) {
2460 theta = angles[0]; phi = angles[1]; psi = angles[2];
2461 cosTheta = cos(theta); cosPhi = cos(phi); cosPsi = cos(psi);
2462 sinTheta = sin(theta); sinPhi = sin(phi); sinPsi = sin(psi);
2468 rotMatrix[0][0] = cosPhi*cosPsi; rotMatrix[1][0] = sinTheta*sinPhi*cosPsi - cosTheta*sinPsi; rotMatrix[2][0] = cosTheta*sinPhi*cosPsi + sinTheta*sinPsi;
2469 rotMatrix[0][1] = cosPhi*sinPsi; rotMatrix[1][1] = sinTheta*sinPhi*sinPsi + cosTheta*cosPsi; rotMatrix[2][1] = cosTheta*sinPhi*sinPsi - sinTheta*cosPsi;
2470 rotMatrix[0][2] = -sinPhi; rotMatrix[1][2] = sinTheta*cosPhi; rotMatrix[2][2] = cosTheta*cosPhi;
2474 Limiter[iVar] = Buffer_Receive_Limit[iVar*nVertexR+iVertex];
2478 Limiter[1] = rotMatrix[0][0]*Buffer_Receive_Limit[1*nVertexR+iVertex] +
2479 rotMatrix[0][1]*Buffer_Receive_Limit[2*nVertexR+iVertex];
2480 Limiter[2] = rotMatrix[1][0]*Buffer_Receive_Limit[1*nVertexR+iVertex] +
2481 rotMatrix[1][1]*Buffer_Receive_Limit[2*nVertexR+iVertex];
2484 Limiter[1] = rotMatrix[0][0]*Buffer_Receive_Limit[1*nVertexR+iVertex] +
2485 rotMatrix[0][1]*Buffer_Receive_Limit[2*nVertexR+iVertex] +
2486 rotMatrix[0][2]*Buffer_Receive_Limit[3*nVertexR+iVertex];
2487 Limiter[2] = rotMatrix[1][0]*Buffer_Receive_Limit[1*nVertexR+iVertex] +
2488 rotMatrix[1][1]*Buffer_Receive_Limit[2*nVertexR+iVertex] +
2489 rotMatrix[1][2]*Buffer_Receive_Limit[3*nVertexR+iVertex];
2490 Limiter[3] = rotMatrix[2][0]*Buffer_Receive_Limit[1*nVertexR+iVertex] +
2491 rotMatrix[2][1]*Buffer_Receive_Limit[2*nVertexR+iVertex] +
2492 rotMatrix[2][2]*Buffer_Receive_Limit[3*nVertexR+iVertex];
2497 node[iPoint]->SetLimiter_Primitive(iVar, Limiter[iVar]);
2502 delete [] Buffer_Receive_Limit;
2514 unsigned long iter, iPoint, iVertex, jVertex, iPointTotal,
2515 Buffer_Send_nPointTotal = 0;
2516 long iGlobalIndex, iGlobal;
2517 unsigned short iVar, iMarker, jMarker;
2518 long nDomain = 0, iDomain, jDomain;
2522 unsigned short nPrimVar_ =
nPrimVar;
2523 if (rans) nPrimVar_ += 2;
2536 long *Buffer_Send_Data = NULL;
2538 unsigned long *nPointTotal_s =
new unsigned long[
size];
2539 unsigned long *nPointTotal_r =
new unsigned long[
size];
2542 unsigned long Buffer_Size_PrimVar = 0;
2543 unsigned long Buffer_Size_Data = 0;
2545 unsigned long PointTotal_Counter = 0;
2549 su2double *Buffer_Receive_PrimVar = NULL;
2550 long *Buffer_Receive_Data = NULL;
2559 for (iDomain = 0; iDomain < nDomain; iDomain++) {
2564 Buffer_Send_nPointTotal = 0;
2569 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
2572 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
2577 if ((iDomain == jDomain) && (geometry->
node[iPoint]->
GetDomain())) {
2578 Buffer_Send_nPointTotal++;
2586 nPointTotal_s[iDomain] = Buffer_Send_nPointTotal;
2590 Buffer_Size_PrimVar += nPointTotal_s[iDomain]*(nPrimVar_);
2591 Buffer_Size_Data += nPointTotal_s[iDomain]*(3);
2597 Buffer_Send_PrimVar =
new su2double[Buffer_Size_PrimVar];
2598 Buffer_Send_Data =
new long[Buffer_Size_Data];
2603 for (iDomain = 0; iDomain < nDomain; iDomain++) {
2607 if (
rank != iDomain) {
2621 nPointTotal_r[iDomain] = nPointTotal_s[iDomain];
2629 if (
rank == iDomain) {
2631 for (jDomain = 0; jDomain <
size; jDomain++) {
2635 if (
rank != jDomain) {
2662 PointTotal_Counter = 0;
2664 for (iDomain = 0; iDomain < nDomain; iDomain++) {
2672 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
2676 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
2683 if ((iDomain == jDomain) && (geometry->
node[iPoint]->
GetDomain())) {
2685 for (iVar = 0; iVar <
nPrimVar; iVar++) {
2686 Buffer_Send_PrimVar[(nPrimVar_)*(PointTotal_Counter+iPointTotal)+iVar] =
node[iPoint]->
GetPrimitive(iVar);
2690 Buffer_Send_PrimVar[(nPrimVar_)*(PointTotal_Counter+iPointTotal)+(
nPrimVar+1)] = 0.0;
2697 Buffer_Send_Data[(3)*(PointTotal_Counter+iPointTotal)+(0)] = iGlobalIndex;
2698 Buffer_Send_Data[(3)*(PointTotal_Counter+iPointTotal)+(1)] = jVertex;
2699 Buffer_Send_Data[(3)*(PointTotal_Counter+iPointTotal)+(2)] = jMarker;
2713 if (iDomain !=
rank) {
2720 SU2_MPI::Bsend(&Buffer_Send_PrimVar[PointTotal_Counter*(nPrimVar_)],
2721 nPointTotal_s[iDomain]*(nPrimVar_),
MPI_DOUBLE, iDomain,
2725 nPointTotal_s[iDomain]*(3),
MPI_LONG, iDomain,
2736 Buffer_Receive_PrimVar =
new su2double[nPointTotal_s[iDomain]*(nPrimVar_)];
2737 Buffer_Receive_Data =
new long[nPointTotal_s[iDomain]*(3)];
2739 for (iter = 0; iter < nPointTotal_s[iDomain]*(nPrimVar_); iter++)
2740 Buffer_Receive_PrimVar[iter] = Buffer_Send_PrimVar[PointTotal_Counter*(nPrimVar_)+iter];
2742 for (iter = 0; iter < nPointTotal_s[iDomain]*(3); iter++)
2743 Buffer_Receive_Data[iter] = Buffer_Send_Data[PointTotal_Counter*(3)+iter];
2748 for (iPoint = 0; iPoint < nPointTotal_r[iDomain]; iPoint++) {
2750 for (iVar = 0; iVar < nPrimVar_; iVar++)
2751 iPrimVar[iVar] = Buffer_Receive_PrimVar[iPoint*(nPrimVar_)+iVar];
2753 iGlobal = Buffer_Receive_Data[iPoint*(3)+(0)];
2754 iVertex = Buffer_Receive_Data[iPoint*(3)+(1)];
2755 iMarker = Buffer_Receive_Data[iPoint*(3)+(2)];
2757 for (iVar = 0; iVar < nPrimVar_; iVar++)
2766 delete [] Buffer_Receive_PrimVar;
2767 delete [] Buffer_Receive_Data;
2773 PointTotal_Counter += iPointTotal;
2789 for (iDomain = 0; iDomain <
size; iDomain++) {
2791 if (
rank != iDomain) {
2798 Buffer_Receive_PrimVar =
new su2double [nPointTotal_r[iDomain]*(nPrimVar_)];
2799 Buffer_Receive_Data =
new long [nPointTotal_r[iDomain]*(3)];
2812 for (iPoint = 0; iPoint < nPointTotal_r[iDomain]; iPoint++) {
2814 iGlobal = Buffer_Receive_Data[iPoint*(3)+(0)];
2815 iVertex = Buffer_Receive_Data[iPoint*(3)+(1)];
2816 iMarker = Buffer_Receive_Data[iPoint*(3)+(2)];
2818 for (iVar = 0; iVar < nPrimVar_; iVar++)
2819 iPrimVar[iVar] = Buffer_Receive_PrimVar[iPoint*(nPrimVar_)+iVar];
2821 for (iVar = 0; iVar < nPrimVar_; iVar++) {
2831 delete [] Buffer_Receive_PrimVar;
2832 delete [] Buffer_Receive_Data;
2850 delete[] Buffer_Send_PrimVar;
2851 delete[] Buffer_Send_Data;
2855 delete [] nPointTotal_s;
2856 delete [] nPointTotal_r;
2863 unsigned long iter, iPoint, iVertex, jVertex, iPointTotal,
2864 Buffer_Send_nPointTotal = 0;
2865 long iGlobalIndex, iGlobal;
2866 unsigned short iVar, iMarker, jMarker;
2867 long nDomain = 0, iDomain, jDomain;
2882 unsigned long *nPointTotal_s =
new unsigned long[
size];
2883 unsigned long *nPointTotal_r =
new unsigned long[
size];
2886 unsigned long Buffer_Size_PrimVar = 0;
2888 unsigned long PointTotal_Counter = 0;
2892 su2double *Buffer_Receive_PrimVar = NULL;
2901 for (iDomain = 0; iDomain < nDomain; iDomain++) {
2906 Buffer_Send_nPointTotal = 0;
2911 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
2913 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
2916 if ((iDomain == jDomain) && (geometry->
node[iPoint]->
GetDomain())) {
2917 Buffer_Send_nPointTotal++;
2925 nPointTotal_s[iDomain] = Buffer_Send_nPointTotal;
2929 Buffer_Size_PrimVar += nPointTotal_s[iDomain]*(
nPrimVar+3);
2935 Buffer_Send_PrimVar =
new su2double[Buffer_Size_PrimVar];
2940 for (iDomain = 0; iDomain < nDomain; iDomain++) {
2944 if (
rank != iDomain) {
2958 nPointTotal_r[iDomain] = nPointTotal_s[iDomain];
2966 if (
rank == iDomain) {
2968 for (jDomain = 0; jDomain <
size; jDomain++) {
2972 if (
rank != jDomain) {
2999 PointTotal_Counter = 0;
3001 for (iDomain = 0; iDomain < nDomain; iDomain++) {
3009 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
3013 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
3016 if ((iDomain == jDomain) && (geometry->
node[iPoint]->
GetDomain())) {
3020 for (iVar = 0; iVar <
nPrimVar; iVar++) {
3039 if (iDomain !=
rank) {
3060 for (iter = 0; iter < nPointTotal_s[iDomain]*(
nPrimVar+3); iter++)
3061 Buffer_Receive_PrimVar[iter] = Buffer_Send_PrimVar[PointTotal_Counter*(
nPrimVar+3)+iter];
3065 for (iPoint = 0; iPoint < nPointTotal_r[iDomain]; iPoint++) {
3070 for (iVar = 0; iVar <
nPrimVar; iVar++)
3071 iPrimVar[iVar] = Buffer_Receive_PrimVar[iPoint*(
nPrimVar+3)+iVar];
3073 if (iVertex < 0.0) cout <<
" Negative iVertex (receive)" << endl;
3074 if (iMarker < 0.0) cout <<
" Negative iMarker (receive)" << endl;
3076 if (iMarker >
nMarker) cout <<
"ERROR" << endl;
3077 if (iVertex > geometry->
nVertex[iMarker]) cout <<
"ERROR" << endl;
3079 for (iVar = 0; iVar <
nPrimVar; iVar++)
3088 delete [] Buffer_Receive_PrimVar;
3094 PointTotal_Counter += iPointTotal;
3110 for (iDomain = 0; iDomain <
size; iDomain++) {
3112 if (
rank != iDomain) {
3129 for (iPoint = 0; iPoint < nPointTotal_r[iDomain]; iPoint++) {
3134 for (iVar = 0; iVar <
nPrimVar; iVar++)
3135 iPrimVar[iVar] = Buffer_Receive_PrimVar[iPoint*(
nPrimVar+3)+iVar];
3137 if (iVertex < 0.0) cout <<
" Negative iVertex (receive)" << endl;
3138 if (iMarker < 0.0) cout <<
" Negative iMarker (receive)" << endl;
3140 if (iMarker >
nMarker) cout <<
"ERROR" << endl;
3141 if (iVertex > geometry->
nVertex[iMarker]) cout <<
"ERROR" << endl;
3143 for (iVar = 0; iVar <
nPrimVar; iVar++)
3152 delete [] Buffer_Receive_PrimVar;
3170 delete[] Buffer_Send_PrimVar;
3174 delete [] nPointTotal_s;
3175 delete [] nPointTotal_r;
3182 unsigned long iter, iPoint, iVertex, jVertex, iPointTotal,
3183 Buffer_Send_nPointTotal = 0, iGlobalIndex, iGlobal;
3184 unsigned short iVar, iMarker, jMarker;
3185 long nDomain = 0, iDomain, jDomain;
3201 unsigned long *nPointTotal_s =
new unsigned long[
size];
3202 unsigned long *nPointTotal_r =
new unsigned long[
size];
3204 unsigned long Buffer_Size_PrimVar = 0;
3205 unsigned long PointTotal_Counter = 0;
3209 su2double *Buffer_Receive_PrimVar = NULL;
3218 for (iDomain = 0; iDomain < nDomain; iDomain++) {
3223 Buffer_Send_nPointTotal = 0;
3228 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
3230 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
3233 if ((iDomain == jDomain) && (geometry->
node[iPoint]->
GetDomain())) {
3234 Buffer_Send_nPointTotal++;
3242 nPointTotal_s[iDomain] = Buffer_Send_nPointTotal;
3246 Buffer_Size_PrimVar += nPointTotal_s[iDomain]*(
nPrimVar+3);
3252 Buffer_Send_PrimVar =
new su2double[Buffer_Size_PrimVar];
3257 for (iDomain = 0; iDomain < nDomain; iDomain++) {
3261 if (
rank != iDomain) {
3275 nPointTotal_r[iDomain] = nPointTotal_s[iDomain];
3283 if (
rank == iDomain) {
3285 for (jDomain = 0; jDomain <
size; jDomain++) {
3289 if (
rank != jDomain) {
3316 PointTotal_Counter = 0;
3318 for (iDomain = 0; iDomain < nDomain; iDomain++) {
3326 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
3330 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
3335 if ((iDomain == jDomain) && (geometry->
node[iPoint]->
GetDomain())) {
3341 for (iVar = 0; iVar <
nPrimVar; iVar++) {
3360 if (iDomain !=
rank) {
3381 for (iter = 0; iter < nPointTotal_s[iDomain]*(
nPrimVar+3); iter++)
3382 Buffer_Receive_PrimVar[iter] = Buffer_Send_PrimVar[PointTotal_Counter*(
nPrimVar+3)+iter];
3386 for (iPoint = 0; iPoint < nPointTotal_r[iDomain]; iPoint++) {
3391 for (iVar = 0; iVar <
nPrimVar; iVar++)
3392 iPrimVar[iVar] = Buffer_Receive_PrimVar[iPoint*(
nPrimVar+3)+iVar];
3394 if (iVertex < 0.0) cout <<
" Negative iVertex (receive)" << endl;
3395 if (iMarker < 0.0) cout <<
" Negative iMarker (receive)" << endl;
3397 for (iVar = 0; iVar <
nPrimVar; iVar++)
3406 delete [] Buffer_Receive_PrimVar;
3412 PointTotal_Counter += iPointTotal;
3426 for (iDomain = 0; iDomain <
size; iDomain++) {
3428 if (
rank != iDomain) {
3445 for (iPoint = 0; iPoint < nPointTotal_r[iDomain]; iPoint++) {
3450 for (iVar = 0; iVar <
nPrimVar; iVar++)
3451 iPrimVar[iVar] = Buffer_Receive_PrimVar[iPoint*(
nPrimVar+3)+iVar];
3453 if (iVertex < 0.0) cout <<
" Negative iVertex (receive)" << endl;
3454 if (iMarker < 0.0) cout <<
" Negative iMarker (receive)" << endl;
3456 if (iMarker >
nMarker) cout <<
"ERROR" << endl;
3457 if (iVertex > geometry->
nVertex[iMarker]) cout <<
"ERROR" << endl;
3459 for (iVar = 0; iVar <
nPrimVar; iVar++)
3468 delete [] Buffer_Receive_PrimVar;
3486 delete[] Buffer_Send_PrimVar;
3490 delete [] nPointTotal_s;
3491 delete [] nPointTotal_r;
3497 unsigned short iMarker;
3498 unsigned long iVertex, iPoint;
3516 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
3519 config->
GetTranspirationParams(Marker_Tag, x0, x1, x2, x3, y0, y1, y2, y3, eps0, eps1, eps2, eps3);
3523 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
3527 if(x >= x0 && x <= x1){
3528 eps = eps0 + (x - x0)*(eps1-eps0)/(x1-x0);
3539 a[0] = x0; a[1] = -x0+x1; a[2] = -x0+x3; a[3] = x0-x1+x2-x3;
3540 b[0] = y0; b[1] = -y0+y1; b[2] = -y0+y3; b[3] = y0-y1+y2-y3;
3541 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
3548 aa = a[3]*b[2] - a[2]*b[3];
3549 bb = a[3]*b[0] - a[0]*b[3] + a[1]*b[2] - a[2]*b[1] + x*b[3] - y*a[3];
3550 cc = a[1]*b[0] - a[0]*b[1] + x*b[1] - y*a[1];
3553 s[1] = (-bb + sqrt(bb*bb - 4.*aa*cc))/(2.*aa);
3555 s[0] = (x - a[0] - a[2]*s[1])/(a[1] + a[3]*s[1]);
3557 if(s[0] >= 0. && s[0] <= 1. && s[1] >= 0.0 && s[1] <= 1.0){
3558 eps = (1.-s[0])*(1.-s[1])*eps0 + s[0]*(1.-s[1])*eps1 + s[0]*s[1]*eps2 + (1.-s[0])*s[1]*eps3;
3573 su2double Temperature_FreeStream = 0.0, Mach2Vel_FreeStream = 0.0, ModVel_FreeStream = 0.0,
3574 Energy_FreeStream = 0.0, ModVel_FreeStreamND = 0.0, Velocity_Reynolds = 0.0,
3575 Omega_FreeStream = 0.0, Omega_FreeStreamND = 0.0, Viscosity_FreeStream = 0.0,
3576 Density_FreeStream = 0.0, Pressure_FreeStream = 0.0, Tke_FreeStream = 0.0,
3577 Length_Ref = 0.0, Density_Ref = 0.0, Pressure_Ref = 0.0, Velocity_Ref = 0.0,
3578 Temperature_Ref = 0.0, Time_Ref = 0.0, Omega_Ref = 0.0, Force_Ref = 0.0,
3579 Gas_Constant_Ref = 0.0, Viscosity_Ref = 0.0, Conductivity_Ref = 0.0, Energy_Ref= 0.0,
3580 Froude = 0.0, Pressure_FreeStreamND = 0.0, Density_FreeStreamND = 0.0,
3581 Temperature_FreeStreamND = 0.0, Gas_ConstantND = 0.0,
3582 Velocity_FreeStreamND[3] = {0.0, 0.0, 0.0}, Viscosity_FreeStreamND = 0.0,
3583 Tke_FreeStreamND = 0.0, Energy_FreeStreamND = 0.0,
3584 Total_UnstTimeND = 0.0, Delta_UnstTimeND = 0.0, TgammaR = 0.0;
3586 unsigned short iDim;
3611 TgammaR = ((vf*vf)*(b*b)*(w_alpha*w_alpha)*mu) / (Mach*Mach);
3630 if (free_stream_temp) {
3649 if (free_stream_temp) {
3665 if (free_stream_temp) {
3681 if (free_stream_temp) {
3711 ModVel_FreeStream = 0.0;
3712 for (iDim = 0; iDim <
nDim; iDim++)
3731 if (reynolds_init) {
3736 if (grid_movement) Velocity_Reynolds = config->
GetMach_Motion()*Mach2Vel_FreeStream;
3737 else Velocity_Reynolds = ModVel_FreeStream;
3749 Density_FreeStream = Reynolds*Viscosity_FreeStream/(Velocity_Reynolds*config->
GetLength_Reynolds());
3785 if (tkeNeeded) { Energy_FreeStream += Tke_FreeStream; }; config->
SetEnergy_FreeStream(Energy_FreeStream);
3793 Temperature_Ref = 1.0;
3796 Pressure_Ref = Pressure_FreeStream;
3797 Density_Ref = Density_FreeStream;
3798 Temperature_Ref = Temperature_FreeStream;
3801 Pressure_Ref =
Gamma*Pressure_FreeStream;
3802 Density_Ref = Density_FreeStream;
3803 Temperature_Ref = Temperature_FreeStream;
3806 Pressure_Ref = Mach*Mach*
Gamma*Pressure_FreeStream;
3807 Density_Ref = Density_FreeStream;
3808 Temperature_Ref = Temperature_FreeStream;
3816 Time_Ref = Length_Ref/Velocity_Ref; config->
SetTime_Ref(Time_Ref);
3817 Omega_Ref = Velocity_Ref/Length_Ref; config->
SetOmega_Ref(Omega_Ref);
3821 Conductivity_Ref = Viscosity_Ref*Gas_Constant_Ref; config->
SetConductivity_Ref(Conductivity_Ref);
3829 for (iDim = 0; iDim <
nDim; iDim++) {
3838 ModVel_FreeStreamND = 0.0;
3839 for (iDim = 0; iDim <
nDim; iDim++) ModVel_FreeStreamND += Velocity_FreeStreamND[iDim]*Velocity_FreeStreamND[iDim];
3842 Viscosity_FreeStreamND = Viscosity_FreeStream / Viscosity_Ref; config->
SetViscosity_FreeStreamND(Viscosity_FreeStreamND);
3909 if (tkeNeeded) { Energy_FreeStreamND += Tke_FreeStreamND; }; config->
SetEnergy_FreeStreamND(Energy_FreeStreamND);
3911 Energy_Ref = Energy_FreeStream/Energy_FreeStreamND; config->
SetEnergy_Ref(Energy_Ref);
3923 cout <<
"Viscous flow: Computing pressure using the ideal gas law" << endl;
3924 cout <<
"based on the free-stream temperature and a density computed" << endl;
3925 cout <<
"from the Reynolds number." << endl;
3927 cout <<
"Inviscid flow: Computing density based on free-stream" << endl;
3928 cout <<
"temperature and pressure using the ideal gas law." << endl;
3931 if (grid_movement) cout <<
"Force coefficients computed using MACH_MOTION." << endl;
3932 else cout <<
"Force coefficients computed using free-stream values." << endl;
3934 cout <<
"-- Input conditions:"<< endl;
3939 cout <<
"Fluid Model: STANDARD_AIR "<< endl;
3943 cout <<
"Specific gas constant (non-dim): " << config->
GetGas_ConstantND()<< endl;
3944 cout <<
"Specific Heat Ratio: "<<
Gamma << endl;
3948 cout <<
"Fluid Model: IDEAL_GAS "<< endl;
3949 cout <<
"Specific gas constant: " << config->
GetGas_Constant() <<
" N.m/kg.K." << endl;
3950 cout <<
"Specific gas constant (non-dim): " << config->
GetGas_ConstantND()<< endl;
3951 cout <<
"Specific Heat Ratio: "<<
Gamma << endl;
3955 cout <<
"Fluid Model: Van der Waals "<< endl;
3956 cout <<
"Specific gas constant: " << config->
GetGas_Constant() <<
" N.m/kg.K." << endl;
3957 cout <<
"Specific gas constant (non-dim): " << config->
GetGas_ConstantND()<< endl;
3958 cout <<
"Specific Heat Ratio: "<<
Gamma << endl;
3966 cout <<
"Fluid Model: Peng-Robinson "<< endl;
3967 cout <<
"Specific gas constant: " << config->
GetGas_Constant() <<
" N.m/kg.K." << endl;
3968 cout <<
"Specific gas constant (non-dim): " << config->
GetGas_ConstantND()<< endl;
3969 cout <<
"Specific Heat Ratio: "<<
Gamma << endl;
3981 cout <<
"Viscosity Model: CONSTANT_VISCOSITY "<< endl;
3985 cout <<
"Laminar Viscosity (non-dim): " << config->
GetMu_ConstantND()<< endl;
3989 cout <<
"Viscosity Model: SUTHERLAND "<< endl;
3990 cout <<
"Ref. Laminar Viscosity: " << config->
GetMu_Ref();
3996 cout <<
"Sutherland Constant: "<< config->
GetMu_S();
3999 cout <<
"Laminar Viscosity (non-dim): " << config->
GetMu_ConstantND()<< endl;
4001 cout <<
"Sutherland constant (non-dim): "<< config->
GetMu_SND()<< endl;
4008 cout <<
"Conductivity Model: CONSTANT_PRANDTL "<< endl;
4013 cout <<
"Conductivity Model: CONSTANT_CONDUCTIVITY "<< endl;
4014 cout <<
"Molecular Conductivity: " << config->
GetKt_Constant()<<
" W/m^2.K." << endl;
4015 cout <<
"Molecular Conductivity (non-dim): " << config->
GetKt_ConstantND()<< endl;
4062 cout <<
"Free-stream turb. kinetic energy per unit mass: " << config->
GetTke_FreeStream();
4075 cout <<
"-- Reference values:"<< endl;
4097 cout <<
"Reference energy per unit mass: " << config->
GetEnergy_Ref();
4111 if (unsteady) cout <<
"Reference time: " << config->
GetTime_Ref() <<
" s." << endl;
4115 cout <<
"-- Resulting non-dimensional state:" << endl;
4116 cout <<
"Mach number (non-dim): " << config->
GetMach() << endl;
4123 cout <<
"Froude number (non-dim): " << Froude << endl;
4124 cout <<
"Lenght of the baseline wave (non-dim): " << 2.0*
PI_NUMBER*Froude*Froude << endl;
4127 cout <<
"Specific gas constant (non-dim): " << config->
GetGas_ConstantND() << endl;
4143 cout <<
"Free-stream total energy per unit mass (non-dim): " << config->
GetEnergy_FreeStreamND() << endl;
4148 cout <<
"Free-stream turb. kinetic energy (non-dim): " << config->
GetTke_FreeStreamND() << endl;
4166 unsigned long iPoint;
4167 unsigned short iMesh, iDim;
4168 su2double X0[3] = {0.0,0.0,0.0}, X1[3] = {0.0,0.0,0.0}, X2[3] = {0.0,0.0,0.0},
4169 X1_X0[3] = {0.0,0.0,0.0}, X2_X0[3] = {0.0,0.0,0.0}, X2_X1[3] = {0.0,0.0,0.0},
4170 CP[3] = {0.0,0.0,0.0}, Distance, DotCheck, Radius;
4183 if (SubsonicEngine) {
4187 if ((ExtIter == 0) && (!restart)) {
4189 su2double Velocity_Cyl[3] = {0.0, 0.0, 0.0}, Velocity_CylND[3] = {0.0, 0.0, 0.0}, Viscosity_Cyl,
4190 Density_Cyl, Density_CylND, Pressure_CylND, ModVel_Cyl, ModVel_CylND, Energy_CylND,
4191 T_ref = 0.0, S = 0.0, Mu_ref = 0.0, *Coord, *SubsonicEngine_Cyl, *SubsonicEngine_Values;
4194 su2double Mach_Cyl = SubsonicEngine_Values[0];
4195 su2double Alpha_Cyl = SubsonicEngine_Values[1];
4196 su2double Beta_Cyl = SubsonicEngine_Values[2];
4197 su2double Pressure_Cyl = SubsonicEngine_Values[3];
4198 su2double Temperature_Cyl = SubsonicEngine_Values[4];
4206 su2double Mach2Vel_Cyl = sqrt(
Gamma*Gas_Constant*Temperature_Cyl);
4208 for (iMesh = 0; iMesh <= config->
GetnMGLevels(); iMesh++) {
4210 for (iPoint = 0; iPoint < geometry[iMesh]->
GetnPoint(); iPoint++) {
4212 Velocity_Cyl[0] = cos(Alpha)*cos(Beta)*Mach_Cyl*Mach2Vel_Cyl;
4213 Velocity_Cyl[1] = sin(Beta)*Mach_Cyl*Mach2Vel_Cyl;
4214 Velocity_Cyl[2] = sin(Alpha)*cos(Beta)*Mach_Cyl*Mach2Vel_Cyl;
4217 for (iDim = 0; iDim <
nDim; iDim++) {
4218 ModVel_Cyl += Velocity_Cyl[iDim]*Velocity_Cyl[iDim];
4220 ModVel_Cyl = sqrt(ModVel_Cyl);
4225 T_ref = (273.15 - 273.15) * 1.8 + 491.67;
4226 S = (110.4 - 273.15) * 1.8 + 491.67;
4227 Mu_ref = 1.716E-5/47.88025898;
4229 Viscosity_Cyl = Mu_ref*(pow(Temperature_Cyl/T_ref, 1.5) * (T_ref+S)/(Temperature_Cyl+S));
4231 Pressure_Cyl = Density_Cyl*Gas_Constant*Temperature_Cyl;
4234 Density_Cyl = Pressure_Cyl/(Gas_Constant*Temperature_Cyl);
4240 for (iDim = 0; iDim <
nDim; iDim++) {
4245 for (iDim = 0; iDim <
nDim; iDim++) {
4246 ModVel_CylND += Velocity_CylND[iDim]*Velocity_CylND[iDim];
4248 ModVel_CylND = sqrt(ModVel_CylND);
4250 Energy_CylND = Pressure_CylND/(Density_CylND*
Gamma_Minus_One)+0.5*ModVel_CylND*ModVel_CylND;
4256 X0[0] = Coord[0]; X0[1] = Coord[1]; X0[2] = Coord[2];
4257 X1[0] = SubsonicEngine_Cyl[0]; X1[1] = SubsonicEngine_Cyl[1]; X1[2] = SubsonicEngine_Cyl[2];
4258 X2[0] = SubsonicEngine_Cyl[3]; X2[1] = SubsonicEngine_Cyl[4]; X2[2] = SubsonicEngine_Cyl[5];
4259 Radius = SubsonicEngine_Cyl[6];
4261 for (iDim = 0; iDim <
nDim; iDim++) {
4262 X2_X1[iDim]= X1[iDim] - X2[iDim];
4263 X1_X0[iDim]= X0[iDim] - X1[iDim];
4264 X2_X0[iDim]= X0[iDim] - X2[iDim];
4267 CP[0] = (X2_X1[1]*X1_X0[2] - X2_X1[2]*X1_X0[1]);
4268 CP[1] = (X2_X1[2]*X1_X0[0] - X2_X1[0]*X1_X0[2]);
4269 CP[2] = (X2_X1[0]*X1_X0[1] - X2_X1[1]*X1_X0[0]);
4271 Distance = sqrt((CP[0]*CP[0]+CP[1]*CP[1]+CP[2]*CP[2])/(X2_X1[0]*X2_X1[0]+X2_X1[1]*X2_X1[1]+X2_X1[2]*X2_X1[2]));
4273 DotCheck = -(X1_X0[0]*X2_X1[0]+X1_X0[1]*X2_X1[1]+X1_X0[2]*X2_X1[2]);
4274 if (DotCheck < 0.0) Distance = sqrt(X1_X0[0]*X1_X0[0]+X1_X0[1]*X1_X0[1]+X1_X0[2]*X1_X0[2]);
4276 DotCheck = (X2_X0[0]*X2_X1[0]+X2_X0[1]*X2_X1[1]+X2_X0[2]*X2_X1[2]);
4277 if (DotCheck < 0.0) Distance = sqrt(X2_X0[0]*X2_X0[0]+X2_X0[1]*X2_X0[1]+X2_X0[2]*X2_X0[2]);
4279 if (Distance < Radius) {
4282 for (iDim = 0; iDim <
nDim; iDim++)
4283 solver_container[iMesh][
FLOW_SOL]->
node[iPoint]->SetSolution(iDim+1, Density_CylND*Velocity_CylND[iDim]);
4287 for (iDim = 0; iDim <
nDim; iDim++)
4288 solver_container[iMesh][
FLOW_SOL]->
node[iPoint]->SetSolution_Old(iDim+1, Density_CylND*Velocity_CylND[iDim]);
4309 if (dual_time && (ExtIter == 0 || (restart && (
long)ExtIter == config->
GetUnst_RestartIter()))) {
4314 for (iMesh = 0; iMesh <= config->
GetnMGLevels(); iMesh++) {
4315 for (iPoint = 0; iPoint < geometry[iMesh]->
GetnPoint(); iPoint++) {
4338 for (iMesh = 0; iMesh <= config->
GetnMGLevels(); iMesh++) {
4339 for (iPoint = 0; iPoint < geometry[iMesh]->
GetnPoint(); iPoint++) {
4353 unsigned long ErrorCounter = 0;
4355 unsigned long ExtIter = config->
GetExtIter();
4366 bool interface = (config->GetnMarker_InterfaceBound() != 0);
4374 if ((fixed_cl) && (!disc_adjoint) && (!cont_adjoint)) {
SetFarfield_AoA(geometry, solver_container, config, iMesh, Output); }
4386 if (actuator_disk) {
4403 if ((muscl && !center) && (iMesh ==
MESH_0) && !Output) {
4416 if (limiter && (iMesh ==
MESH_0)
4423 if (center && !Output) {
4425 if ((center_jst) && (iMesh ==
MESH_0)) {
4433 if (roe_low_dissipation){
4448 unsigned long MyErrorCounter = ErrorCounter; ErrorCounter = 0;
4457 unsigned short iMesh) { }
4461 unsigned long iPoint, ErrorCounter = 0;
4462 bool RightSol =
true;
4464 for (iPoint = 0; iPoint <
nPoint; iPoint ++) {
4483 return ErrorCounter;
4486 unsigned short iMesh,
unsigned long Iteration) {
4488 su2double *Normal, Area, Vol, Mean_SoundSpeed = 0.0, Mean_ProjVel = 0.0, Lambda, Local_Delta_Time,
4489 Global_Delta_Time = 1E6, Global_Delta_UnstTimeND, ProjVel, ProjVel_i, ProjVel_j;
4490 unsigned long iEdge, iVertex, iPoint, jPoint;
4491 unsigned short iDim, iMarker;
4504 node[iPoint]->SetMax_Lambda_Inv(0.0);
4507 for (iEdge = 0; iEdge < geometry->
GetnEdge(); iEdge++) {
4515 Area = 0.0;
for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim]; Area = sqrt(Area);
4524 if (grid_movement) {
4527 ProjVel_i = 0.0; ProjVel_j = 0.0;
4528 for (iDim = 0; iDim <
nDim; iDim++) {
4529 ProjVel_i += GridVel_i[iDim]*Normal[iDim];
4530 ProjVel_j += GridVel_j[iDim]*Normal[iDim];
4532 Mean_ProjVel -= 0.5 * (ProjVel_i + ProjVel_j);
4537 Lambda = fabs(Mean_ProjVel) + Mean_SoundSpeed;
4545 for (iMarker = 0; iMarker < geometry->
GetnMarker(); iMarker++) {
4547 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
4553 Area = 0.0;
for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim]; Area = sqrt(Area);
4562 if (grid_movement) {
4565 for (iDim = 0; iDim <
nDim; iDim++)
4566 ProjVel += GridVel[iDim]*Normal[iDim];
4567 Mean_ProjVel -= ProjVel;
4571 Lambda = fabs(Mean_ProjVel) + Mean_SoundSpeed;
4587 Global_Delta_Time = min(Global_Delta_Time, Local_Delta_Time);
4622 sbuf_time = Global_Delta_Time;
4625 Global_Delta_Time = rbuf_time;
4634 if (config->
GetCFL(iMesh) == 0.0) {
4645 if ((dual_time) && (Iteration == 0) && (config->
GetUnst_CFL() != 0.0) && (iMesh ==
MESH_0)) {
4646 Global_Delta_UnstTimeND = config->
GetUnst_CFL()*Global_Delta_Time/config->
GetCFL(iMesh);
4650 sbuf_time = Global_Delta_UnstTimeND;
4653 Global_Delta_UnstTimeND = rbuf_time;
4671 CConfig *config,
unsigned short iMesh,
unsigned short iRKStep) {
4673 unsigned long iEdge, iPoint, jPoint;
4679 for (iEdge = 0; iEdge < geometry->
GetnEdge(); iEdge++) {
4704 if (grid_movement) {
4729 CConfig *config,
unsigned short iMesh) {
4731 su2double **Gradient_i, **Gradient_j, Project_Grad_i, Project_Grad_j, RoeVelocity[3] = {0.0,0.0,0.0}, R, sq_vel, RoeEnthalpy,
4732 *V_i, *V_j, *S_i, *S_j, *Limiter_i = NULL, *Limiter_j = NULL, sqvel, Non_Physical = 1.0, Sensor_i, Sensor_j, Dissipation_i, Dissipation_j, *Coord_i, *Coord_j;
4734 su2double z, velocity2_i, velocity2_j, mach_i, mach_j, vel_i_corr[3], vel_j_corr[3];
4736 unsigned long iEdge, iPoint, jPoint, counter_local = 0, counter_global = 0;
4737 unsigned short iDim, iVar;
4739 bool neg_density_i =
false, neg_density_j =
false, neg_pressure_i =
false, neg_pressure_j =
false, neg_sound_speed =
false;
4741 unsigned long ExtIter = config->
GetExtIter();
4755 for (iEdge = 0; iEdge < geometry->
GetnEdge(); iEdge++) {
4766 for (iDim = 0; iDim <
nDim; iDim ++)
4785 for (iDim = 0; iDim <
nDim; iDim++) {
4798 Project_Grad_i = 0.0; Project_Grad_j = 0.0;
4800 for (iDim = 0; iDim <
nDim; iDim++) {
4801 Project_Grad_i +=
Vector_i[iDim]*Gradient_i[iVar][iDim]*Non_Physical;
4802 Project_Grad_j +=
Vector_j[iDim]*Gradient_j[iVar][iDim]*Non_Physical;
4806 Limiter_i[iVar] = (V_j[iVar]-V_i[iVar])*(2.0*Project_Grad_i + V_j[iVar]-V_i[iVar])/(4*Project_Grad_i*Project_Grad_i+(V_j[iVar]-V_i[iVar])*(V_j[iVar]-V_i[iVar])+
EPS);
4807 Limiter_j[iVar] = (V_j[iVar]-V_i[iVar])*(-2.0*Project_Grad_j + V_j[iVar]-V_i[iVar])/(4*Project_Grad_j*Project_Grad_j+(V_j[iVar]-V_i[iVar])*(V_j[iVar]-V_i[iVar])+
EPS);
4809 Primitive_i[iVar] = V_i[iVar] + Limiter_i[iVar]*Project_Grad_i;
4810 Primitive_j[iVar] = V_j[iVar] + Limiter_j[iVar]*Project_Grad_j;
4825 if (low_mach_corr) {
4830 for (iDim = 0; iDim <
nDim; iDim++) {
4837 z = min(max(mach_i,mach_j),1.0);
4840 for (iDim = 0; iDim <
nDim; iDim++) {
4846 velocity2_j += vel_j_corr[iDim]*vel_j_corr[iDim];
4847 velocity2_i += vel_i_corr[iDim]*vel_i_corr[iDim];
4872 for (iDim = 0; iDim <
nDim; iDim++) {
4874 sq_vel += RoeVelocity[iDim]*RoeVelocity[iDim];
4877 neg_sound_speed = ((
Gamma-1)*(RoeEnthalpy-0.5*sq_vel) < 0.0);
4879 if (neg_sound_speed) {
4880 for (iVar = 0; iVar <
nPrimVar; iVar++) {
4888 if (neg_density_i || neg_pressure_i) {
4894 if (neg_density_j || neg_pressure_j) {
4924 numerics->
SetSensor(Sensor_i, Sensor_j);
4926 if (kind_dissipation ==
NTS || kind_dissipation ==
NTS_DUCROS){
4929 numerics->
SetCoord(Coord_i, Coord_j);
4973 counter_global = counter_local;
4981 unsigned short iDim;
4986 for (iDim = 0; iDim <
nDim; iDim++) {
5002 for (iDim = 0; iDim <
nDim; iDim++) {
5017 CConfig *config,
unsigned short iMesh) {
5019 unsigned short iVar;
5020 unsigned long iPoint;
5031 for (iVar = 0; iVar <
nVar; iVar++)
Residual[iVar] = 0.0;
5054 if (rotating_frame) {
5082 for (iVar = 0; iVar <
nVar; iVar ++)
5083 for (
unsigned short jVar = 0; jVar <
nVar; jVar ++)
5132 if (harmonic_balance) {
5143 for (iVar = 0; iVar <
nVar; iVar++) {
5186 CConfig *config,
unsigned short iMesh) {
5201 su2double *Normal, Area, Mean_SoundSpeed = 0.0, Mean_ProjVel = 0.0, Lambda,
5202 ProjVel, ProjVel_i, ProjVel_j, *GridVel, *GridVel_i, *GridVel_j;
5203 unsigned long iEdge, iVertex, iPoint, jPoint;
5204 unsigned short iDim, iMarker;
5216 for (iEdge = 0; iEdge < geometry->
GetnEdge(); iEdge++) {
5224 Area = 0.0;
for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim]; Area = sqrt(Area);
5233 if (grid_movement) {
5236 ProjVel_i = 0.0; ProjVel_j =0.0;
5237 for (iDim = 0; iDim <
nDim; iDim++) {
5238 ProjVel_i += GridVel_i[iDim]*Normal[iDim];
5239 ProjVel_j += GridVel_j[iDim]*Normal[iDim];
5241 Mean_ProjVel -= 0.5 * (ProjVel_i + ProjVel_j);
5246 Lambda = fabs(Mean_ProjVel) + Mean_SoundSpeed;
5254 for (iMarker = 0; iMarker < geometry->
GetnMarker(); iMarker++) {
5256 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
5262 Area = 0.0;
for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim]; Area = sqrt(Area);
5271 if (grid_movement) {
5274 for (iDim = 0; iDim <
nDim; iDim++)
5275 ProjVel += GridVel[iDim]*Normal[iDim];
5276 Mean_ProjVel -= ProjVel;
5281 Lambda = fabs(Mean_ProjVel) + Mean_SoundSpeed;
5297 unsigned long iPoint, jPoint, iEdge;
5298 su2double Pressure_i = 0, Pressure_j = 0, *Diff;
5299 unsigned short iVar;
5300 bool boundary_i, boundary_j;
5305 node[iPoint]->SetUnd_LaplZero();
5307 for (iEdge = 0; iEdge < geometry->
GetnEdge(); iEdge++) {
5314 for (iVar = 0; iVar <
nVar; iVar++)
5328 if ((!boundary_i && !boundary_j) || (boundary_i && boundary_j)) {
5335 if (!boundary_i && boundary_j)
5340 if (boundary_i && !boundary_j)
5355 unsigned long iEdge, iPoint, jPoint;
5356 su2double Pressure_i = 0.0, Pressure_j = 0.0;
5357 bool boundary_i, boundary_j;
5368 for (iEdge = 0; iEdge < geometry->
GetnEdge(); iEdge++) {
5381 if ((!boundary_i && !boundary_j) || (boundary_i && boundary_j)) {
5388 if (!boundary_i && boundary_j)
5393 if (boundary_i && !boundary_j)
5411 unsigned long iPoint, jPoint;
5412 unsigned short iNeigh, iDim;
5416 su2double uixi = 0.0, Ducros_i = 0.0, Ducros_j = 0.0, Omega = 0.0;
5418 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++){
5423 for(iDim = 0; iDim <
nDim; iDim++){
5431 for (iDim = 0; iDim <
nDim; iDim++){
5432 Omega += Vorticity[iDim]*Vorticity[iDim];
5434 Omega = sqrt(Omega);
5439 Ducros_i = -uixi / (fabs(uixi) + Omega + 1e-20);
5441 Ducros_i = pow(uixi,2.0) /(pow(uixi,2.0)+ pow(Omega,2.0) + 1e-20);
5448 for (iNeigh = 0; iNeigh > geometry->
node[iPoint]->
GetnNeighbor(); iNeigh++){
5455 for(iDim = 0; iDim <
nDim; iDim++){
5463 for (iDim = 0; iDim <
nDim; iDim++){
5464 Omega += Vorticity[iDim]*Vorticity[iDim];
5466 Omega = sqrt(Omega);
5469 Ducros_j = -uixi / (fabs(uixi) + Omega + 1e-20);
5471 Ducros_j = pow(uixi,2.0) /(pow(uixi,2.0)+ pow(Omega,2.0) + 1e-20);
5484 unsigned long iVertex, iPoint;
5485 unsigned short iDim, iMarker, Boundary, Monitoring, iMarker_Monitoring;
5486 su2double Pressure = 0.0, *Normal = NULL, MomentDist[3] = {0.0,0.0,0.0}, *Coord,
5487 factor, NFPressOF, RefVel2, RefTemp, RefDensity, RefPressure, Mach2Vel, Mach_Motion,
5488 Force[3] = {0.0,0.0,0.0},
5489 Momentum = 0.0, Density, Area, MassFlow = 0.0, Velocity[3], Velocity2 = 0.0;
5490 string Marker_Tag, Monitoring_Tag;
5491 su2double MomentX_Force[3] = {0.0,0.0,0.0}, MomentY_Force[3] = {0.0,0.0,0.0}, MomentZ_Force[3] = {0.0,0.0,0.0};
5496 su2double MyAllBound_CD_Inv, MyAllBound_CL_Inv, MyAllBound_CSF_Inv, MyAllBound_CMx_Inv, MyAllBound_CMy_Inv, MyAllBound_CMz_Inv, MyAllBound_CoPx_Inv, MyAllBound_CoPy_Inv, MyAllBound_CoPz_Inv, MyAllBound_CFx_Inv, MyAllBound_CFy_Inv, MyAllBound_CFz_Inv, MyAllBound_CT_Inv, MyAllBound_CQ_Inv, MyAllBound_CNearFieldOF_Inv, *MySurface_CL_Inv = NULL, *MySurface_CD_Inv = NULL, *MySurface_CSF_Inv = NULL, *MySurface_CEff_Inv = NULL, *MySurface_CFx_Inv = NULL, *MySurface_CFy_Inv = NULL, *MySurface_CFz_Inv = NULL, *MySurface_CMx_Inv = NULL, *MySurface_CMy_Inv = NULL, *MySurface_CMz_Inv = NULL;
5497 su2double MyAllBound_Cmu, *MySurface_Cmu = NULL;
5520 if (grid_movement) {
5521 Mach2Vel = sqrt(
Gamma*Gas_Constant*RefTemp);
5523 RefVel2 = (Mach_Motion*Mach2Vel)*(Mach_Motion*Mach2Vel);
5527 for (iDim = 0; iDim <
nDim; iDim++)
5531 factor = 1.0 / (0.5*RefDensity*RefArea*RefVel2);
5551 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
5567 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
5574 if (Monitoring ==
YES) {
5575 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
5578 if (Marker_Tag == Monitoring_Tag)
5602 MomentX_Force[0] = 0.0; MomentX_Force[1] = 0.0; MomentX_Force[2] = 0.0;
5603 MomentY_Force[0] = 0.0; MomentY_Force[1] = 0.0; MomentY_Force[2] = 0.0;
5604 MomentZ_Force[0] = 0.0; MomentZ_Force[1] = 0.0; MomentZ_Force[2] = 0.0;
5612 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
5618 CPressure[iMarker][iVertex] = (Pressure - RefPressure)*factor*RefArea;
5633 for (iDim = 0; iDim <
nDim; iDim++) {
5634 MomentDist[iDim] = Coord[iDim] - Origin[iDim];
5640 else AxiFactor = 1.0;
5645 for (iDim = 0; iDim <
nDim; iDim++) {
5646 Force[iDim] = -(Pressure -
Pressure_Inf) * Normal[iDim] * factor * AxiFactor;
5653 MomentInviscid[0] += (Force[2]*MomentDist[1]-Force[1]*MomentDist[2])/RefLength;
5654 MomentX_Force[1] += (-Force[1]*Coord[2]);
5655 MomentX_Force[2] += (Force[2]*Coord[1]);
5657 MomentInviscid[1] += (Force[0]*MomentDist[2]-Force[2]*MomentDist[0])/RefLength;
5658 MomentY_Force[2] += (-Force[2]*Coord[0]);
5659 MomentY_Force[0] += (Force[0]*Coord[2]);
5661 MomentInviscid[2] += (Force[1]*MomentDist[0]-Force[0]*MomentDist[1])/RefLength;
5662 MomentZ_Force[0] += (-Force[0]*Coord[1]);
5663 MomentZ_Force[1] += (Force[1]*Coord[0]);
5669 for (iDim = 0; iDim <
nDim; iDim++) {
5671 MassFlow -= Normal[iDim]*Velocity[iDim]*Density;
5672 Velocity2 += Velocity[iDim]*Velocity[iDim];
5674 Momentum += abs(MassFlow*sqrt(Velocity2)*factor);
5683 if (Monitoring ==
YES) {
5691 CoPx_Inv[iMarker] = MomentZ_Force[1];
5692 CoPy_Inv[iMarker] = -MomentZ_Force[0];
5698 Cmu[iMarker] = Momentum;
5708 CoPx_Inv[iMarker] = -MomentY_Force[0];
5709 CoPz_Inv[iMarker] = MomentY_Force[2];
5716 Cmu[iMarker] = Momentum;
5739 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
5742 if (Marker_Tag == Monitoring_Tag) {
5828 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
5829 MySurface_CL_Inv[iMarker_Monitoring] =
Surface_CL_Inv[iMarker_Monitoring];
5830 MySurface_CD_Inv[iMarker_Monitoring] =
Surface_CD_Inv[iMarker_Monitoring];
5831 MySurface_CSF_Inv[iMarker_Monitoring] =
Surface_CSF_Inv[iMarker_Monitoring];
5832 MySurface_CEff_Inv[iMarker_Monitoring] =
Surface_CEff_Inv[iMarker_Monitoring];
5833 MySurface_CFx_Inv[iMarker_Monitoring] =
Surface_CFx_Inv[iMarker_Monitoring];
5834 MySurface_CFy_Inv[iMarker_Monitoring] =
Surface_CFy_Inv[iMarker_Monitoring];
5835 MySurface_CFz_Inv[iMarker_Monitoring] =
Surface_CFz_Inv[iMarker_Monitoring];
5836 MySurface_CMx_Inv[iMarker_Monitoring] =
Surface_CMx_Inv[iMarker_Monitoring];
5837 MySurface_CMy_Inv[iMarker_Monitoring] =
Surface_CMy_Inv[iMarker_Monitoring];
5838 MySurface_CMz_Inv[iMarker_Monitoring] =
Surface_CMz_Inv[iMarker_Monitoring];
5839 if(transp) MySurface_Cmu[iMarker_Monitoring] =
Surface_Cmu[iMarker_Monitoring];
5857 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++)
5867 delete [] MySurface_CL_Inv;
delete [] MySurface_CD_Inv;
delete [] MySurface_CSF_Inv;
5868 delete [] MySurface_CEff_Inv;
delete [] MySurface_CFx_Inv;
delete [] MySurface_CFy_Inv;
5869 delete [] MySurface_CFz_Inv;
delete [] MySurface_CMx_Inv;
delete [] MySurface_CMy_Inv;
5870 delete [] MySurface_CMz_Inv;
5871 if(transp)
delete [] MySurface_Cmu;
5898 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
5915 unsigned long iVertex, iPoint;
5916 unsigned short iDim, iMarker, Boundary, Monitoring, iMarker_Monitoring;
5917 su2double *Normal = NULL, MomentDist[3] = {0.0,0.0,0.0}, *Coord, Area,
5918 factor, RefVel2, RefTemp, RefDensity, Mach2Vel, Mach_Motion,
5919 Force[3] = {0.0,0.0,0.0}, Velocity[3], MassFlow, Density;
5920 string Marker_Tag, Monitoring_Tag;
5921 su2double MomentX_Force[3] = {0.0,0.0,0.0}, MomentY_Force[3] = {0.0,0.0,0.0}, MomentZ_Force[3] = {0.0,0.0,0.0};
5925 su2double MyAllBound_CD_Mnt, MyAllBound_CL_Mnt, MyAllBound_CSF_Mnt,
5926 MyAllBound_CMx_Mnt, MyAllBound_CMy_Mnt, MyAllBound_CMz_Mnt,
5927 MyAllBound_CoPx_Mnt, MyAllBound_CoPy_Mnt, MyAllBound_CoPz_Mnt,
5928 MyAllBound_CFx_Mnt, MyAllBound_CFy_Mnt, MyAllBound_CFz_Mnt, MyAllBound_CT_Mnt,
5930 *MySurface_CL_Mnt = NULL, *MySurface_CD_Mnt = NULL, *MySurface_CSF_Mnt = NULL,
5931 *MySurface_CEff_Mnt = NULL, *MySurface_CFx_Mnt = NULL, *MySurface_CFy_Mnt = NULL,
5932 *MySurface_CFz_Mnt = NULL,
5933 *MySurface_CMx_Mnt = NULL, *MySurface_CMy_Mnt = NULL, *MySurface_CMz_Mnt = NULL;
5955 if (grid_movement) {
5956 Mach2Vel = sqrt(
Gamma*Gas_Constant*RefTemp);
5958 RefVel2 = (Mach_Motion*Mach2Vel)*(Mach_Motion*Mach2Vel);
5962 for (iDim = 0; iDim <
nDim; iDim++)
5966 factor = 1.0 / (0.5*RefDensity*RefArea*RefVel2);
5977 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
5987 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
5994 if (Monitoring ==
YES) {
5995 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
5998 if (Marker_Tag == Monitoring_Tag)
6018 MomentX_Force[0] = 0.0; MomentX_Force[1] = 0.0; MomentX_Force[2] = 0.0;
6019 MomentY_Force[0] = 0.0; MomentY_Force[1] = 0.0; MomentY_Force[2] = 0.0;
6020 MomentZ_Force[0] = 0.0; MomentZ_Force[1] = 0.0; MomentZ_Force[2] = 0.0;
6024 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
6040 Area = 0.0;
for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim]; Area = sqrt(Area);
6043 for (iDim = 0; iDim <
nDim; iDim++) {
6045 MomentDist[iDim] = Coord[iDim] - Origin[iDim];
6046 MassFlow -= Normal[iDim]*Velocity[iDim]*Density;
6052 else AxiFactor = 1.0;
6057 for (iDim = 0; iDim <
nDim; iDim++) {
6058 Force[iDim] = MassFlow * Velocity[iDim] * factor * AxiFactor;
6065 MomentMomentum[0] += (Force[2]*MomentDist[1]-Force[1]*MomentDist[2])/RefLength;
6066 MomentX_Force[1] += (-Force[1]*Coord[2]);
6067 MomentX_Force[2] += (Force[2]*Coord[1]);
6069 MomentMomentum[1] += (Force[0]*MomentDist[2]-Force[2]*MomentDist[0])/RefLength;
6070 MomentY_Force[2] += (-Force[2]*Coord[0]);
6071 MomentY_Force[0] += (Force[0]*Coord[2]);
6073 MomentMomentum[2] += (Force[1]*MomentDist[0]-Force[0]*MomentDist[1])/RefLength;
6074 MomentZ_Force[0] += (-Force[0]*Coord[1]);
6075 MomentZ_Force[1] += (Force[1]*Coord[0]);
6083 if (Monitoring ==
YES) {
6092 CoPx_Mnt[iMarker] = MomentZ_Force[1];
6093 CoPy_Mnt[iMarker] = -MomentZ_Force[0];
6109 CoPx_Mnt[iMarker] = -MomentY_Force[0];
6110 CoPz_Mnt[iMarker] = MomentY_Force[2];
6134 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
6137 if (Marker_Tag == Monitoring_Tag) {
6206 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
6207 MySurface_CL_Mnt[iMarker_Monitoring] =
Surface_CL_Mnt[iMarker_Monitoring];
6208 MySurface_CD_Mnt[iMarker_Monitoring] =
Surface_CD_Mnt[iMarker_Monitoring];
6209 MySurface_CSF_Mnt[iMarker_Monitoring] =
Surface_CSF_Mnt[iMarker_Monitoring];
6210 MySurface_CEff_Mnt[iMarker_Monitoring] =
Surface_CEff_Mnt[iMarker_Monitoring];
6211 MySurface_CFx_Mnt[iMarker_Monitoring] =
Surface_CFx_Mnt[iMarker_Monitoring];
6212 MySurface_CFy_Mnt[iMarker_Monitoring] =
Surface_CFy_Mnt[iMarker_Monitoring];
6213 MySurface_CFz_Mnt[iMarker_Monitoring] =
Surface_CFz_Mnt[iMarker_Monitoring];
6214 MySurface_CMx_Mnt[iMarker_Monitoring] =
Surface_CMx_Mnt[iMarker_Monitoring];
6215 MySurface_CMy_Mnt[iMarker_Monitoring] =
Surface_CMy_Mnt[iMarker_Monitoring];
6216 MySurface_CMz_Mnt[iMarker_Monitoring] =
Surface_CMz_Mnt[iMarker_Monitoring];
6233 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++)
6242 delete [] MySurface_CL_Mnt;
delete [] MySurface_CD_Mnt;
delete [] MySurface_CSF_Mnt;
6243 delete [] MySurface_CEff_Mnt;
delete [] MySurface_CFx_Mnt;
delete [] MySurface_CFy_Mnt;
6244 delete [] MySurface_CFz_Mnt;
6245 delete [] MySurface_CMx_Mnt;
delete [] MySurface_CMy_Mnt;
delete [] MySurface_CMz_Mnt;
6270 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
6286 CConfig *config,
unsigned short iRKStep) {
6288 unsigned short iVar;
6289 unsigned long iPoint;
6294 for (iVar = 0; iVar <
nVar; iVar++) {
6309 for (iVar = 0; iVar <
nVar; iVar++) {
6310 Res =
Residual[iVar] + Res_TruncError[iVar];
6331 CConfig *config,
unsigned short iRKStep) {
6333 unsigned short iVar;
6334 unsigned long iPoint;
6337 su2double RK_FuncCoeff[4] = {1.0/6.0, 1.0/3.0, 1.0/3.0, 1.0/6.0};
6338 su2double RK_TimeCoeff[4] = {0.5, 0.5, 1.0, 1.0};
6342 for (iVar = 0; iVar <
nVar; iVar++) {
6357 tmp_time = -1.0*RK_TimeCoeff[iRKStep]*Delta;
6358 tmp_func = -1.0*RK_FuncCoeff[iRKStep]*Delta;
6361 for (iVar = 0; iVar <
nVar; iVar++) {
6362 Res =
Residual[iVar] + Res_TruncError[iVar];
6391 su2double *local_Residual, *local_Res_TruncError, Vol, Delta, Res;
6392 unsigned short iVar;
6393 unsigned long iPoint;
6397 for (iVar = 0; iVar <
nVar; iVar++) {
6412 for (iVar = 0; iVar <
nVar; iVar++) {
6413 Res = local_Residual[iVar] + local_Res_TruncError[iVar];
6434 unsigned short iVar, jVar;
6435 unsigned long iPoint, total_index, IterLinSol = 0;
6436 su2double Delta, *local_Res_TruncError, Vol;
6444 for (iVar = 0; iVar <
nVar; iVar++) {
6464 if (
node[iPoint]->GetDelta_Time() != 0.0) {
6466 if (roe_turkel || low_mach_prec) {
6468 for (iVar = 0; iVar <
nVar; iVar ++ )
6469 for (jVar = 0; jVar <
nVar; jVar ++ )
6479 for (iVar = 0; iVar <
nVar; iVar++) {
6480 total_index = iPoint*
nVar + iVar;
6482 local_Res_TruncError[iVar] = 0.0;
6488 for (iVar = 0; iVar <
nVar; iVar++) {
6489 total_index = iPoint*
nVar + iVar;
6500 for (iVar = 0; iVar <
nVar; iVar++) {
6501 total_index = iPoint*
nVar + iVar;
6520 for (iVar = 0; iVar <
nVar; iVar++) {
6537 unsigned long iPoint, jPoint, iEdge, iVertex;
6538 unsigned short iDim, iVar, iMarker;
6540 Partial_Gradient, Partial_Res, *Normal;
6555 for (iEdge = 0; iEdge < geometry->
GetnEdge(); iEdge++) {
6567 for (iDim = 0; iDim <
nDim; iDim++) {
6568 Partial_Res = PrimVar_Average*Normal[iDim];
6570 node[iPoint]->AddGradient_Primitive(iVar, iDim, Partial_Res);
6572 node[jPoint]->SubtractGradient_Primitive(iVar, iDim, Partial_Res);
6579 for (iMarker = 0; iMarker < geometry->
GetnMarker(); iMarker++) {
6582 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
6587 PrimVar_Vertex[iVar] =
node[iPoint]->GetPrimitive(iVar);
6591 for (iDim = 0; iDim <
nDim; iDim++) {
6592 Partial_Res = PrimVar_Vertex[iVar]*Normal[iDim];
6603 for (iDim = 0; iDim <
nDim; iDim++) {
6610 delete [] PrimVar_Vertex;
6620 unsigned short iVar, iDim, jDim, iNeigh;
6621 unsigned long iPoint, jPoint;
6622 su2double *
PrimVar_i, *
PrimVar_j, *Coord_i, *Coord_j, r11, r12, r13, r22, r23, r23_a,
6623 r23_b, r33, weight, product, z11, z12, z13, z22, z23, z33, detR2;
6644 for (iDim = 0; iDim <
nDim; iDim++)
6647 r11 = 0.0; r12 = 0.0; r13 = 0.0; r22 = 0.0;
6648 r23 = 0.0; r23_a = 0.0; r23_b = 0.0; r33 = 0.0;
6654 for (iNeigh = 0; iNeigh < geometry->
node[iPoint]->
GetnPoint(); iNeigh++) {
6664 for (iDim = 0; iDim <
nDim; iDim++)
6665 weight += (Coord_j[iDim]-Coord_i[iDim])*(Coord_j[iDim]-Coord_i[iDim]);
6669 if (weight != 0.0) {
6671 r11 += (Coord_j[0]-Coord_i[0])*(Coord_j[0]-Coord_i[0])/weight;
6672 r12 += (Coord_j[0]-Coord_i[0])*(Coord_j[1]-Coord_i[1])/weight;
6673 r22 += (Coord_j[1]-Coord_i[1])*(Coord_j[1]-Coord_i[1])/weight;
6676 r13 += (Coord_j[0]-Coord_i[0])*(Coord_j[2]-Coord_i[2])/weight;
6677 r23_a += (Coord_j[1]-Coord_i[1])*(Coord_j[2]-Coord_i[2])/weight;
6678 r23_b += (Coord_j[0]-Coord_i[0])*(Coord_j[2]-Coord_i[2])/weight;
6679 r33 += (Coord_j[2]-Coord_i[2])*(Coord_j[2]-Coord_i[2])/weight;
6685 for (iDim = 0; iDim <
nDim; iDim++)
6694 if (r11 >= 0.0) r11 = sqrt(r11);
else r11 = 0.0;
6695 if (r11 != 0.0) r12 = r12/r11;
else r12 = 0.0;
6696 if (r22-r12*r12 >= 0.0) r22 = sqrt(r22-r12*r12);
else r22 = 0.0;
6699 if (r11 != 0.0) r13 = r13/r11;
else r13 = 0.0;
6700 if ((r22 != 0.0) && (r11*r22 != 0.0)) r23 = r23_a/r22 - r23_b*r12/(r11*r22);
else r23 = 0.0;
6701 if (r33-r23*r23-r13*r13 >= 0.0) r33 = sqrt(r33-r23*r23-r13*r13);
else r33 = 0.0;
6706 if (
nDim == 2) detR2 = (r11*r22)*(r11*r22);
6707 else detR2 = (r11*r22*r33)*(r11*r22*r33);
6711 if (abs(detR2) <=
EPS) { detR2 = 1.0; singular =
true; }
6716 for (iDim = 0; iDim <
nDim; iDim++)
6717 for (jDim = 0; jDim <
nDim; jDim++)
6722 Smatrix[0][0] = (r12*r12+r22*r22)/detR2;
6723 Smatrix[0][1] = -r11*r12/detR2;
6725 Smatrix[1][1] = r11*r11/detR2;
6728 z11 = r22*r33; z12 = -r12*r33; z13 = r12*r23-r13*r22;
6729 z22 = r11*r33; z23 = -r11*r23; z33 = r11*r22;
6730 Smatrix[0][0] = (z11*z11+z12*z12+z13*z13)/detR2;
6731 Smatrix[0][1] = (z12*z22+z13*z23)/detR2;
6732 Smatrix[0][2] = (z13*z33)/detR2;
6734 Smatrix[1][1] = (z22*z22+z23*z23)/detR2;
6735 Smatrix[1][2] = (z23*z33)/detR2;
6738 Smatrix[2][2] = (z33*z33)/detR2;
6744 for (iDim = 0; iDim <
nDim; iDim++) {
6746 for (jDim = 0; jDim <
nDim; jDim++) {
6764 unsigned long iEdge, iPoint, jPoint;
6765 unsigned short iVar, iDim;
6766 su2double **Gradient_i, **Gradient_j, *Coord_i, *Coord_j,
6768 *GlobalMinPrimitive, *GlobalMaxPrimitive,
6769 dave, LimK, eps2, eps1, dm, dp, du, y, limiter;
6776 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
6788 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
6798 for (iEdge = 0; iEdge < geometry->
GetnEdge(); iEdge++) {
6828 for (iEdge = 0; iEdge < geometry->
GetnEdge(); iEdge++) {
6852 for (iDim = 0; iDim <
nDim; iDim++)
6853 dm += 0.5*(Coord_j[iDim]-Coord_i[iDim])*Gradient_i[iVar][iDim];
6855 if (dm == 0.0) { limiter = 2.0; }
6862 if (limiter <
node[iPoint]->GetLimiter_Primitive(iVar)) {
6870 for (iDim = 0; iDim <
nDim; iDim++)
6871 dm += 0.5*(Coord_i[iDim]-Coord_j[iDim])*Gradient_j[iVar][iDim];
6873 if (dm == 0.0) { limiter = 2.0; }
6880 if (limiter <
node[jPoint]->GetLimiter_Primitive(iVar)) {
6891 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
6894 limiter = (y*y + 2.0*y) / (y*y + y + 2.0);
6915 LocalMinPrimitive[iVar] =
Primitive[iVar];
6916 LocalMaxPrimitive[iVar] =
Primitive[iVar];
6919 for (iPoint = 0; iPoint < geometry->
GetnPoint(); iPoint++) {
6926 LocalMinPrimitive[iVar] = min (LocalMinPrimitive[iVar],
Primitive[iVar]);
6927 LocalMaxPrimitive[iVar] = max (LocalMaxPrimitive[iVar],
Primitive[iVar]);
6937 GlobalMinPrimitive[iVar] = LocalMinPrimitive[iVar];
6938 GlobalMaxPrimitive[iVar] = LocalMaxPrimitive[iVar];
6942 for (iEdge = 0; iEdge < geometry->
GetnEdge(); iEdge++) {
6960 eps1 = LimK * (GlobalMaxPrimitive[iVar] - GlobalMinPrimitive[iVar]);
6965 eps2 = eps1*eps1*eps1;
6976 for (iDim = 0; iDim <
nDim; iDim++)
6977 dm += 0.5*(Coord_j[iDim]-Coord_i[iDim])*Gradient_i[iVar][iDim];
6984 limiter = ( dp*dp + 2.0*dp*dm + eps2 )/( dp*dp + dp*dm + 2.0*dm*dm + eps2);
6986 if (limiter <
node[iPoint]->GetLimiter_Primitive(iVar)) {
6994 for (iDim = 0; iDim <
nDim; iDim++)
6995 dm += 0.5*(Coord_i[iDim]-Coord_j[iDim])*Gradient_j[iVar][iDim];
7000 limiter = ( dp*dp + 2.0*dp*dm + eps2 )/( dp*dp + dp*dm + 2.0*dm*dm + eps2);
7002 if (limiter <
node[jPoint]->GetLimiter_Primitive(iVar)) {
7013 delete [] LocalMinPrimitive;
delete [] GlobalMinPrimitive;
7014 delete [] LocalMaxPrimitive;
delete [] GlobalMaxPrimitive;
7025 unsigned short iDim, jDim, iVar, jVar;
7026 su2double local_Mach, rho, enthalpy, soundspeed, sq_vel;
7029 su2double Mach_infty2, Mach_lim2, aux, parameter;
7035 Mach_infty2 = pow(config->
GetMach(),2.0);
7036 Mach_lim2 = pow(0.00001,2.0);
7037 aux = max(pow(local_Mach,2.0),Mach_lim2);
7038 parameter = min(1.0, max(aux,Beta_max*Mach_infty2));
7050 for (iDim = 0; iDim <
nDim; iDim ++)
7053 for (iDim = 0; iDim <
nDim; iDim ++) {
7056 for (jDim = 0; jDim <
nDim; jDim ++) {
7063 for (iDim = 0; iDim <
nDim; iDim ++)
7067 for (iVar = 0; iVar <
nVar; iVar ++ ) {
7068 for (jVar = 0; jVar <
nVar; jVar ++ ) {
7079 unsigned short iDim, iMarker, jMarker;
7080 unsigned long iVertex, iPoint;
7081 su2double *V_inlet = NULL, *V_outlet = NULL, Pressure, Temperature, Velocity[3], Vn,
7082 Velocity2, Density, Area, SoundSpeed, TotalPressure, Vel_Infty2, RamDrag,
7083 TotalTemperature, VelocityJet,
7084 Vel_Infty, MaxPressure, MinPressure, MFR, InfVel2;
7085 unsigned short iMarker_Inlet, iMarker_Outlet, nMarker_Inlet, nMarker_Outlet;
7086 string Inlet_TagBound, Outlet_TagBound;
7087 su2double DeltaPress = 0.0, DeltaTemp = 0.0, TotalPressRatio = 0.0, TotalTempRatio = 0.0, StaticPressRatio = 0.0, StaticTempRatio = 0.0,
7088 NetThrust = 0.0, GrossThrust = 0.0, Power = 0.0, MassFlow = 0.0, Mach = 0.0, Force = 0.0;
7089 bool ReverseFlow, Engine =
false, Pair =
true;
7143 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
7145 Inlet_MassFlow[iMarker] = 0.0; Inlet_ReverseMassFlow[iMarker] = 0.0; Inlet_MinPressure[iMarker] = 0.0;
7146 Inlet_Pressure[iMarker] = 0.0; Inlet_Mach[iMarker] = 0.0; Inlet_Temperature[iMarker] = 0.0;
7147 Inlet_MinPressure[iMarker] = +1E10; Inlet_MaxPressure[iMarker] = -1E10; Inlet_Power[iMarker] = 0.0;
7148 Inlet_TotalPressure[iMarker] = 0.0; Inlet_TotalTemperature[iMarker] = 0.0;
7149 Inlet_Area[iMarker] = 0.0;
7150 Inlet_RamDrag[iMarker] = 0.0; Inlet_Force[iMarker] = 0.0;
7151 Inlet_XCG[iMarker] = 0.0; Inlet_YCG[iMarker] = 0.0; Inlet_ZCG[iMarker] = 0.0;
7153 Outlet_MassFlow[iMarker] = 0.0;
7154 Outlet_Pressure[iMarker] = 0.0; Outlet_Temperature[iMarker] = 0.0;
7155 Outlet_TotalPressure[iMarker] = 0.0; Outlet_TotalTemperature[iMarker] = 0.0;
7156 Outlet_Area[iMarker] = 0.0;
7157 Outlet_GrossThrust[iMarker] = 0.0; Outlet_Force[iMarker] = 0.0; Outlet_Power[iMarker] = 0.0;
7159 MinPressure = +1E10; MaxPressure = -1E10;
7164 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
7174 Temperature = V_inlet[0];
7175 Pressure = V_inlet[
nDim+1];
7177 Density = V_inlet[
nDim+2];
7178 SoundSpeed = sqrt(
Gamma*Pressure/Density);
7180 Velocity2 = 0.0; Area = 0.0; MassFlow = 0.0; Vel_Infty2 =0.0;
7181 for (iDim = 0; iDim <
nDim; iDim++) {
7183 Velocity[iDim] = V_inlet[iDim+1];
7184 Velocity2 += Velocity[iDim]*Velocity[iDim];
7186 MassFlow -=
Vector[iDim]*Velocity[iDim]*Density;
7189 Vn = 0.0; ReverseFlow =
false;
7190 for (iDim = 0; iDim <
nDim; iDim++) { Vn -= Velocity[iDim]*
Vector[iDim]/Area; }
7191 if (Vn < 0.0) { ReverseFlow =
true; }
7193 Vel_Infty = sqrt (Vel_Infty2);
7195 Mach = sqrt(Velocity2)/SoundSpeed;
7196 TotalPressure = Pressure * pow( 1.0 + Mach * Mach * 0.5 * (
Gamma - 1.0),
Gamma / (
Gamma - 1.0));
7197 TotalTemperature = Temperature * (1.0 + Mach * Mach * 0.5 * (
Gamma - 1.0));
7198 MinPressure = min(MinPressure, TotalPressure);
7199 MaxPressure = max(MaxPressure, TotalPressure);
7201 RamDrag = MassFlow * Vel_Infty;
7203 Inlet_MassFlow[iMarker] += MassFlow;
7204 Inlet_Pressure[iMarker] += Pressure*MassFlow;
7205 Inlet_Mach[iMarker] += Mach*MassFlow;
7206 Inlet_MinPressure[iMarker] = min (MinPressure, Inlet_MinPressure[iMarker]);
7207 Inlet_MaxPressure[iMarker] = max(MaxPressure, Inlet_MaxPressure[iMarker]);
7208 Inlet_TotalPressure[iMarker] += TotalPressure*MassFlow;
7209 Inlet_Temperature[iMarker] += Temperature*MassFlow;
7210 Inlet_TotalTemperature[iMarker] += TotalTemperature*MassFlow;
7211 Inlet_Area[iMarker] += Area;
7212 Inlet_RamDrag[iMarker] += RamDrag;
7213 Inlet_Power[iMarker] += MassFlow*Cp*TotalTemperature;
7214 if (ReverseFlow) Inlet_ReverseMassFlow[iMarker] += MassFlow;
7220 Inlet_Force[iMarker] += Inlet_ForceX*cos(Alpha)*cos(Beta) + Inlet_ForceY*sin(Beta) +Inlet_ForceZ*sin(Alpha)*cos(Beta);
7222 Inlet_XCG[iMarker] += geometry->
node[iPoint]->
GetCoord(0)*Area;
7223 Inlet_YCG[iMarker] += geometry->
node[iPoint]->
GetCoord(1)*Area;
7224 if (
nDim == 3) Inlet_ZCG[iMarker] += geometry->
node[iPoint]->
GetCoord(2)*Area;
7234 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
7244 Temperature = V_outlet[0];
7245 Pressure = V_outlet[
nDim+1];
7247 Density = V_outlet[
nDim+2];
7248 SoundSpeed = sqrt(
Gamma*Pressure/Density);
7250 Velocity2 = 0.0; Area = 0.0; MassFlow = 0.0; Vel_Infty2 = 0.0;
7251 for (iDim = 0; iDim <
nDim; iDim++) {
7253 Velocity[iDim] = V_outlet[iDim+1];
7254 Velocity2 += Velocity[iDim]*Velocity[iDim];
7256 MassFlow +=
Vector[iDim]*Velocity[iDim]*Density;
7259 Vel_Infty = sqrt (Vel_Infty2);
7261 Mach = sqrt(Velocity2)/SoundSpeed;
7262 TotalPressure = Pressure * pow( 1.0 + Mach * Mach * 0.5 * (
Gamma - 1.0),
Gamma / (
Gamma - 1.0));
7263 TotalTemperature = Temperature * (1.0 + Mach * Mach * 0.5 * (
Gamma - 1.0));
7264 VelocityJet = sqrt(Velocity2) ;
7266 GrossThrust = MassFlow * VelocityJet;
7268 Outlet_MassFlow[iMarker] += MassFlow;
7269 Outlet_Pressure[iMarker] += Pressure*MassFlow;
7270 Outlet_TotalPressure[iMarker] += TotalPressure*MassFlow;
7271 Outlet_Temperature[iMarker] += Temperature*MassFlow;
7272 Outlet_TotalTemperature[iMarker] += TotalTemperature*MassFlow;
7273 Outlet_Area[iMarker] += Area;
7274 Outlet_GrossThrust[iMarker] += GrossThrust;
7275 Outlet_Power[iMarker] += MassFlow*Cp*TotalTemperature;
7282 if (
nDim == 2) Outlet_Force[iMarker] += Outlet_ForceX*cos(Alpha) + Outlet_ForceY*sin(Alpha);
7283 if (
nDim == 3) Outlet_Force[iMarker] += Outlet_ForceX*cos(Alpha)*cos(Beta) + Outlet_ForceY*sin(Beta) + Outlet_ForceZ*sin(Alpha)*cos(Beta);
7328 for (iMarker_Inlet = 0; iMarker_Inlet < nMarker_Inlet; iMarker_Inlet++) {
7329 Inlet_MassFlow_Local[iMarker_Inlet] = 0.0;
7330 Inlet_ReverseMassFlow_Local[iMarker_Inlet] = 0.0;
7331 Inlet_Pressure_Local[iMarker_Inlet] = 0.0;
7332 Inlet_Mach_Local[iMarker_Inlet] = 0.0;
7333 Inlet_MinPressure_Local[iMarker_Inlet] = 0.0;
7334 Inlet_MaxPressure_Local[iMarker_Inlet] = 0.0;
7335 Inlet_TotalPressure_Local[iMarker_Inlet] = 0.0;
7336 Inlet_Temperature_Local[iMarker_Inlet] = 0.0;
7337 Inlet_TotalTemperature_Local[iMarker_Inlet] = 0.0;
7338 Inlet_RamDrag_Local[iMarker_Inlet] = 0.0;
7339 Inlet_Force_Local[iMarker_Inlet] = 0.0;
7340 Inlet_Power_Local[iMarker_Inlet] = 0.0;
7341 Inlet_Area_Local[iMarker_Inlet] = 0.0;
7342 Inlet_XCG_Local[iMarker_Inlet] = 0.0;
7343 Inlet_YCG_Local[iMarker_Inlet] = 0.0;
7344 Inlet_ZCG_Local[iMarker_Inlet] = 0.0;
7346 Inlet_MassFlow_Total[iMarker_Inlet] = 0.0;
7347 Inlet_ReverseMassFlow_Total[iMarker_Inlet] = 0.0;
7348 Inlet_Pressure_Total[iMarker_Inlet] = 0.0;
7349 Inlet_Mach_Total[iMarker_Inlet] = 0.0;
7350 Inlet_MinPressure_Total[iMarker_Inlet] = 0.0;
7351 Inlet_MaxPressure_Total[iMarker_Inlet] = 0.0;
7352 Inlet_TotalPressure_Total[iMarker_Inlet] = 0.0;
7353 Inlet_Temperature_Total[iMarker_Inlet] = 0.0;
7354 Inlet_TotalTemperature_Total[iMarker_Inlet] = 0.0;
7355 Inlet_RamDrag_Total[iMarker_Inlet] = 0.0;
7356 Inlet_Force_Total[iMarker_Inlet] = 0.0;
7357 Inlet_Power_Total[iMarker_Inlet] = 0.0;
7358 Inlet_Area_Total[iMarker_Inlet] = 0.0;
7359 Inlet_XCG_Total[iMarker_Inlet] = 0.0;
7360 Inlet_YCG_Total[iMarker_Inlet] = 0.0;
7361 Inlet_ZCG_Total[iMarker_Inlet] = 0.0;
7384 for (iMarker_Outlet = 0; iMarker_Outlet < nMarker_Outlet; iMarker_Outlet++) {
7385 Outlet_MassFlow_Local[iMarker_Outlet] = 0.0;
7386 Outlet_Pressure_Local[iMarker_Outlet] = 0.0;
7387 Outlet_TotalPressure_Local[iMarker_Outlet] = 0.0;
7388 Outlet_Temperature_Local[iMarker_Outlet] = 0.0;
7389 Outlet_TotalTemperature_Local[iMarker_Outlet] = 0.0;
7390 Outlet_GrossThrust_Local[iMarker_Outlet] = 0.0;
7391 Outlet_Force_Local[iMarker_Outlet] = 0.0;
7392 Outlet_Power_Local[iMarker_Outlet] = 0.0;
7393 Outlet_Area_Local[iMarker_Outlet] = 0.0;
7395 Outlet_MassFlow_Total[iMarker_Outlet] = 0.0;
7396 Outlet_Pressure_Total[iMarker_Outlet] = 0.0;
7397 Outlet_TotalPressure_Total[iMarker_Outlet] = 0.0;
7398 Outlet_Temperature_Total[iMarker_Outlet] = 0.0;
7399 Outlet_TotalTemperature_Total[iMarker_Outlet] = 0.0;
7400 Outlet_GrossThrust_Total[iMarker_Outlet] = 0.0;
7401 Outlet_Force_Total[iMarker_Outlet] = 0.0;
7402 Outlet_Power_Total[iMarker_Outlet] = 0.0;
7403 Outlet_Area_Total[iMarker_Outlet] = 0.0;
7408 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
7411 for (iMarker_Inlet = 0; iMarker_Inlet < nMarker_Inlet; iMarker_Inlet++) {
7417 Inlet_MassFlow_Local[iMarker_Inlet] += Inlet_MassFlow[iMarker];
7418 Inlet_ReverseMassFlow_Local[iMarker_Inlet] += Inlet_ReverseMassFlow[iMarker];
7419 Inlet_Pressure_Local[iMarker_Inlet] += Inlet_Pressure[iMarker];
7420 Inlet_Mach_Local[iMarker_Inlet] += Inlet_Mach[iMarker];
7421 Inlet_MinPressure_Local[iMarker_Inlet] += Inlet_MinPressure[iMarker];
7422 Inlet_MaxPressure_Local[iMarker_Inlet] += Inlet_MaxPressure[iMarker];
7423 Inlet_TotalPressure_Local[iMarker_Inlet] += Inlet_TotalPressure[iMarker];
7424 Inlet_Temperature_Local[iMarker_Inlet] += Inlet_Temperature[iMarker];
7425 Inlet_TotalTemperature_Local[iMarker_Inlet] += Inlet_TotalTemperature[iMarker];
7426 Inlet_RamDrag_Local[iMarker_Inlet] += Inlet_RamDrag[iMarker];
7427 Inlet_Force_Local[iMarker_Inlet] += Inlet_Force[iMarker];
7428 Inlet_Power_Local[iMarker_Inlet] += Inlet_Power[iMarker];
7429 Inlet_Area_Local[iMarker_Inlet] += Inlet_Area[iMarker];
7430 Inlet_XCG_Local[iMarker_Inlet] += Inlet_XCG[iMarker];
7431 Inlet_YCG_Local[iMarker_Inlet] += Inlet_YCG[iMarker];
7432 if (
nDim == 3) Inlet_ZCG_Local[iMarker_Inlet] += Inlet_ZCG[iMarker];
7439 for (iMarker_Outlet= 0; iMarker_Outlet < nMarker_Outlet; iMarker_Outlet++) {
7445 Outlet_MassFlow_Local[iMarker_Outlet] += Outlet_MassFlow[iMarker];
7446 Outlet_Pressure_Local[iMarker_Outlet] += Outlet_Pressure[iMarker];
7447 Outlet_TotalPressure_Local[iMarker_Outlet] += Outlet_TotalPressure[iMarker];
7448 Outlet_Temperature_Local[iMarker_Outlet] += Outlet_Temperature[iMarker];
7449 Outlet_TotalTemperature_Local[iMarker_Outlet] += Outlet_TotalTemperature[iMarker];
7450 Outlet_GrossThrust_Local[iMarker_Outlet] += Outlet_GrossThrust[iMarker];
7451 Outlet_Force_Local[iMarker_Outlet] += Outlet_Force[iMarker];
7452 Outlet_Power_Local[iMarker_Outlet] += Outlet_Power[iMarker];
7453 Outlet_Area_Local[iMarker_Outlet] += Outlet_Area[iMarker];
7463 bool ActDisk =
false;
7464 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
7470 for (iMarker_Inlet = 0; iMarker_Inlet < nMarker_Inlet; iMarker_Inlet++) {
7471 Inlet_MinPressure_Local[iMarker_Inlet] = 1E10;
7472 Inlet_MaxPressure_Local[iMarker_Inlet] = -1E10;
7509 for (iMarker_Inlet = 0; iMarker_Inlet < nMarker_Inlet; iMarker_Inlet++) {
7510 Inlet_MassFlow_Total[iMarker_Inlet] = Inlet_MassFlow_Local[iMarker_Inlet];
7511 Inlet_ReverseMassFlow_Total[iMarker_Inlet] = Inlet_ReverseMassFlow_Local[iMarker_Inlet];
7512 Inlet_Pressure_Total[iMarker_Inlet] = Inlet_Pressure_Local[iMarker_Inlet];
7513 Inlet_Mach_Total[iMarker_Inlet] = Inlet_Mach_Local[iMarker_Inlet];
7514 Inlet_MinPressure_Total[iMarker_Inlet] = Inlet_MinPressure_Local[iMarker_Inlet];
7515 Inlet_MaxPressure_Total[iMarker_Inlet] = Inlet_MaxPressure_Local[iMarker_Inlet];
7516 Inlet_TotalPressure_Total[iMarker_Inlet] = Inlet_TotalPressure_Local[iMarker_Inlet];
7517 Inlet_Temperature_Total[iMarker_Inlet] = Inlet_Temperature_Local[iMarker_Inlet];
7518 Inlet_TotalTemperature_Total[iMarker_Inlet] = Inlet_TotalTemperature_Local[iMarker_Inlet];
7519 Inlet_RamDrag_Total[iMarker_Inlet] = Inlet_RamDrag_Local[iMarker_Inlet];
7520 Inlet_Force_Total[iMarker_Inlet] = Inlet_Force_Local[iMarker_Inlet];
7521 Inlet_Power_Total[iMarker_Inlet] = Inlet_Power_Local[iMarker_Inlet];
7522 Inlet_Area_Total[iMarker_Inlet] = Inlet_Area_Local[iMarker_Inlet];
7523 Inlet_XCG_Total[iMarker_Inlet] = Inlet_XCG_Local[iMarker_Inlet];
7524 Inlet_YCG_Total[iMarker_Inlet] = Inlet_YCG_Local[iMarker_Inlet];
7525 if (
nDim == 3) Inlet_ZCG_Total[iMarker_Inlet] = Inlet_ZCG_Local[iMarker_Inlet];
7528 for (iMarker_Outlet = 0; iMarker_Outlet < nMarker_Outlet; iMarker_Outlet++) {
7529 Outlet_MassFlow_Total[iMarker_Outlet] = Outlet_MassFlow_Local[iMarker_Outlet];
7530 Outlet_Pressure_Total[iMarker_Outlet] = Outlet_Pressure_Local[iMarker_Outlet];
7531 Outlet_TotalPressure_Total[iMarker_Outlet] = Outlet_TotalPressure_Local[iMarker_Outlet];
7532 Outlet_Temperature_Total[iMarker_Outlet] = Outlet_Temperature_Local[iMarker_Outlet];
7533 Outlet_TotalTemperature_Total[iMarker_Outlet] = Outlet_TotalTemperature_Local[iMarker_Outlet];
7534 Outlet_GrossThrust_Total[iMarker_Outlet] = Outlet_GrossThrust_Local[iMarker_Outlet];
7535 Outlet_Force_Total[iMarker_Outlet] = Outlet_Force_Local[iMarker_Outlet];
7536 Outlet_Power_Total[iMarker_Outlet] = Outlet_Power_Local[iMarker_Outlet];
7537 Outlet_Area_Total[iMarker_Outlet] = Outlet_Area_Local[iMarker_Outlet];
7545 for (iMarker_Inlet = 0; iMarker_Inlet < nMarker_Inlet; iMarker_Inlet++) {
7546 if (Inlet_Area_Total[iMarker_Inlet] != 0.0) {
7547 Inlet_Pressure_Total[iMarker_Inlet] /= Inlet_MassFlow_Total[iMarker_Inlet];
7548 Inlet_Mach_Total[iMarker_Inlet] /= Inlet_MassFlow_Total[iMarker_Inlet];
7549 Inlet_TotalPressure_Total[iMarker_Inlet] /= Inlet_MassFlow_Total[iMarker_Inlet];
7550 Inlet_Temperature_Total[iMarker_Inlet] /= Inlet_MassFlow_Total[iMarker_Inlet];
7551 Inlet_TotalTemperature_Total[iMarker_Inlet] /= Inlet_MassFlow_Total[iMarker_Inlet];
7552 Inlet_XCG_Total[iMarker_Inlet] /= Inlet_Area_Total[iMarker_Inlet];
7553 Inlet_YCG_Total[iMarker_Inlet] /= Inlet_Area_Total[iMarker_Inlet];
7554 if (
nDim == 3) Inlet_ZCG_Total[iMarker_Inlet] /= Inlet_Area_Total[iMarker_Inlet];
7557 Inlet_Pressure_Total[iMarker_Inlet] = 0.0;
7558 Inlet_Mach_Total[iMarker_Inlet] = 0.0;
7559 Inlet_TotalPressure_Total[iMarker_Inlet] = 0.0;
7560 Inlet_Temperature_Total[iMarker_Inlet] = 0.0;
7561 Inlet_TotalTemperature_Total[iMarker_Inlet] = 0.0;
7562 Inlet_XCG_Total[iMarker_Inlet] = 0.0;
7563 Inlet_YCG_Total[iMarker_Inlet] = 0.0;
7564 if (
nDim == 3) Inlet_ZCG_Total[iMarker_Inlet] = 0.0;
7577 config->
SetInflow_Force(iMarker_Inlet, Inlet_Force_Total[iMarker_Inlet]);
7578 config->
SetInflow_Power(iMarker_Inlet, Inlet_Power_Total[iMarker_Inlet]);
7596 for (iMarker_Outlet = 0; iMarker_Outlet < nMarker_Outlet; iMarker_Outlet++) {
7597 if (Outlet_Area_Total[iMarker_Outlet] != 0.0) {
7598 Outlet_Pressure_Total[iMarker_Outlet] /= Outlet_MassFlow_Total[iMarker_Outlet];
7599 Outlet_TotalPressure_Total[iMarker_Outlet] /= Outlet_MassFlow_Total[iMarker_Outlet];
7600 Outlet_Temperature_Total[iMarker_Outlet] /= Outlet_MassFlow_Total[iMarker_Outlet];
7601 Outlet_TotalTemperature_Total[iMarker_Outlet] /= Outlet_MassFlow_Total[iMarker_Outlet];
7604 Outlet_Pressure_Total[iMarker_Outlet] = 0.0;
7605 Outlet_TotalPressure_Total[iMarker_Outlet] = 0.0;
7606 Outlet_Temperature_Total[iMarker_Outlet] = 0.0;
7607 Outlet_TotalTemperature_Total[iMarker_Outlet] = 0.0;
7619 config->
SetExhaust_Force(iMarker_Outlet, Outlet_Force_Total[iMarker_Outlet]);
7620 config->
SetExhaust_Power(iMarker_Outlet, Outlet_Power_Total[iMarker_Outlet]);
7642 for (iMarker_Inlet = 0; iMarker_Inlet < nMarker_Inlet; iMarker_Inlet++) {
7656 su2double DeltaPress = 0.0, DeltaTemp = 0.0, NetThrust = 0.0, GrossThrust = 0.0, TotalPressRatio = 0.0, TotalTempRatio = 0.0, StaticPressRatio = 0.0, StaticTempRatio = 0.0;
7684 Mach = Inlet_Mach_Total[iMarker_Inlet];
7685 Area = Inlet_Area_Total[iMarker_Inlet];
7718 cout.setf(ios::fixed, ios::floatfield);
7721 if (Engine) cout << endl <<
"---------------------------- Engine properties --------------------------" << endl;
7722 else cout << endl <<
"------------------------ Actuator Disk properties -----------------------" << endl;
7725 for (iMarker_Inlet = 0; iMarker_Inlet < nMarker_Inlet; iMarker_Inlet++) {
7765 su2double MinPressure = Inlet_MinPressure_Total[iMarker_Inlet]/TotalPressure_Inf;
7766 su2double MaxPressure = Inlet_MaxPressure_Total[iMarker_Inlet]/TotalPressure_Inf;
7767 su2double AvePressure = Inlet_TotalPressure_Total[iMarker_Inlet]/TotalPressure_Inf;
7773 su2double Factor = (0.5*RefDensity*RefArea*RefVel2);
7799 su2double Solid_CD = Solid_Drag / Factor;
7850 su2double mu_prop = fabs(DmT)*sqrt(RefVel2)/Power;
7855 su2double mu_bypass_prop = NetThrust*sqrt(RefVel2)/Power;
7861 if ((P2/P1) > 0.0) mu_isentropic = (T1/(T2-T1))*(pow((P2/P1),(
Gamma-1.0)/
Gamma)-1.0);
7866 su2double poly_coeff = 1.0/(1.0-log(T2/T1)/log(P2/P1));
7872 if (iMarker_Inlet > 0) cout << endl;
7876 if (Engine) cout <<
"Engine surfaces: " << Inlet_TagBound <<
", " << Outlet_TagBound <<
"." << endl;
7877 else cout <<
"Actuator disk surfaces: " << Inlet_TagBound <<
", " << Outlet_TagBound <<
"." << endl;
7881 cout <<
"CG (m): (" << Inlet_XCG_Total[iMarker_Inlet] <<
", " << Inlet_YCG_Total[iMarker_Inlet] <<
"). Length (m): " << Inlet_Area_Total[iMarker_Inlet] <<
"." << endl;
7883 cout <<
"CG (in): (" << Inlet_XCG_Total[iMarker_Inlet]*12.0 <<
", " << Inlet_YCG_Total[iMarker_Inlet]*12.0 <<
"). Length (in): " << Inlet_Area_Total[iMarker_Inlet]*12.0 <<
"." << endl;
7889 cout <<
"CG (m): (" << Inlet_XCG_Total[iMarker_Inlet] <<
", " << Inlet_YCG_Total[iMarker_Inlet] <<
", " << Inlet_ZCG_Total[iMarker_Inlet] <<
"). Area (m^2): " << Inlet_Area_Total[iMarker_Inlet] <<
". Radius (m): " << sqrt(Inlet_Area_Total[iMarker_Inlet]/
PI_NUMBER) <<
"." << endl;
7891 cout <<
"CG (in): (" << Inlet_XCG_Total[iMarker_Inlet]*12.0 <<
", " << Inlet_YCG_Total[iMarker_Inlet]*12.0 <<
", " << Inlet_ZCG_Total[iMarker_Inlet]*12.0 <<
"). Area (in^2): " << Inlet_Area_Total[iMarker_Inlet]*12.0*12.0 <<
"." << endl;
7899 cout << setprecision(2) <<
"Inlet Ave. P (Pa): " << Pstatic1*config->
GetPressure_Ref() << setprecision(3) <<
". Inlet Ave. Mach: " << Mach <<
"." << endl;
7900 cout << setprecision(2) <<
"Outlet Ave. PT (Pa): " << P2*config->
GetPressure_Ref() <<
". Outlet Ave. TT (K): " << T2*config->
GetTemperature_Ref() <<
"." << endl;
7903 cout << setprecision(2) <<
"Inlet Ave. P (psf): " << Pstatic1*config->
GetPressure_Ref() << setprecision(3) <<
". Inlet Ave. Mach: " << Mach <<
"." << endl;
7904 cout << setprecision(2) <<
"Outlet Ave. PT (psf): " << P2*config->
GetPressure_Ref() <<
". Outlet Ave. TT (R): " << T2*config->
GetTemperature_Ref() <<
"." << endl;
7907 cout <<
"Inlet min. PT/PTinf: " << MinPressure <<
". Inlet max. PT/PTinf: " << MaxPressure <<
". Inlet Ave. PT/PTinf: " << AvePressure << endl;
7909 su2double InfVel2, Inlet_MassFlow, Outlet_MassFlow;
7914 if (config->
GetSystemMeasurements() ==
SI) { cout <<
"Inlet mass flow (kg/s): "; cout << setprecision(2) << Inlet_MassFlow; }
7915 else if (config->
GetSystemMeasurements() ==
US) { cout <<
"Inlet mass flow (lbs/s): "; cout << setprecision(2) << Inlet_MassFlow * 32.174; }
7923 if (Inlet_MassFlow > Outlet_MassFlow) cout <<
". I/O diff.: " << setprecision(2) << 100.0*fabs(1.0-(Outlet_MassFlow/Inlet_MassFlow)) <<
"%";
7924 else cout <<
". I/O diff.: " << setprecision(2) << -100.0*fabs(1.0-(Inlet_MassFlow/Outlet_MassFlow)) <<
"%";
7927 cout << setprecision(2) <<
". MFR: " << MFR <<
"." << endl;
7931 cout << setprecision(3) <<
"PT in/out ratio: " << TotalPressRatio <<
". TT in/out ratio: " << TotalTempRatio <<
"." << endl;
7942 cout << setprecision(3) <<
"P in/out ratio: ";
7943 cout << setprecision(3) << StaticPressRatio;
7944 cout << setprecision(3) <<
". T in/out ratio: ";
7945 cout << setprecision(3) << StaticTempRatio <<
"."<< endl;
7949 cout << setprecision(1) <<
"\nProp. eff. (D-T.V/Shaft P): " << 100*mu_prop <<
"%. By-pass prop. eff. (NetT.V/Shaft P): " << 100*mu_bypass_prop <<
"%." << endl;
7950 cout << setprecision(1) <<
"Fan adiabatic eff.: " << 100*mu_isentropic <<
"%. Fan poly. eff.: " << 100*mu_polytropic <<
"%. Poly coeff. (n): " << setprecision(4) << poly_coeff <<
"." << endl;
7959 cout << (GrossThrust-NetThrust) * Ref;
7963 cout << -GrossThrust * Ref <<
"." << endl;
7967 cout<< setprecision(1) << Force * Ref <<
". Open surfaces CT: " << setprecision(5) << -Force / Factor <<
"." << endl;
7971 cout << setprecision(1) << Solid_Drag * Ref <<
". Solid surfaces CD: " << setprecision(5) << Solid_CD <<
"." << endl;
7975 cout << setprecision(5) << -NetThrust * Ref <<
". Net CT: " << CT;
7978 cout <<
". Power (W): ";
7979 cout << setprecision(1) << Power * Ref * config->
GetVelocity_Ref() <<
"." << endl;
7982 cout <<
". Power (HP): ";
7983 cout << setprecision(1) << Power * Ref * config->
GetVelocity_Ref() / 550.0 <<
"." << endl;
7990 if (write_heads && Output && !config->
GetDiscrete_Adjoint()) cout <<
"-------------------------------------------------------------------------" << endl << endl;
7997 delete [] Outlet_MassFlow_Local;
7998 delete [] Outlet_Temperature_Local;
7999 delete [] Outlet_TotalTemperature_Local;
8000 delete [] Outlet_Pressure_Local;
8001 delete [] Outlet_TotalPressure_Local;
8002 delete [] Outlet_Area_Local;
8003 delete [] Outlet_GrossThrust_Local;
8004 delete [] Outlet_Force_Local;
8005 delete [] Outlet_Power_Local;
8007 delete [] Outlet_MassFlow_Total;
8008 delete [] Outlet_Temperature_Total;
8009 delete [] Outlet_TotalTemperature_Total;
8010 delete [] Outlet_Pressure_Total;
8011 delete [] Outlet_TotalPressure_Total;
8012 delete [] Outlet_Area_Total;
8013 delete [] Outlet_GrossThrust_Total;
8014 delete [] Outlet_Force_Total;
8015 delete [] Outlet_Power_Total;
8017 delete [] Inlet_MassFlow_Local;
8018 delete [] Inlet_ReverseMassFlow_Local;
8019 delete [] Inlet_Temperature_Local;
8020 delete [] Inlet_TotalTemperature_Local;
8021 delete [] Inlet_Pressure_Local;
8022 delete [] Inlet_Mach_Local;
8023 delete [] Inlet_MinPressure_Local;
8024 delete [] Inlet_MaxPressure_Local;
8025 delete [] Inlet_TotalPressure_Local;
8026 delete [] Inlet_Area_Local;
8027 delete [] Inlet_RamDrag_Local;
8028 delete [] Inlet_Force_Local;
8029 delete [] Inlet_Power_Local;
8030 delete [] Inlet_XCG_Local;
8031 delete [] Inlet_YCG_Local;
8032 delete [] Inlet_ZCG_Local;
8034 delete [] Inlet_MassFlow_Total;
8035 delete [] Inlet_ReverseMassFlow_Total;
8036 delete [] Inlet_Temperature_Total;
8037 delete [] Inlet_TotalTemperature_Total;
8038 delete [] Inlet_Pressure_Total;
8039 delete [] Inlet_Mach_Total;
8040 delete [] Inlet_MinPressure_Total;
8041 delete [] Inlet_MaxPressure_Total;
8042 delete [] Inlet_TotalPressure_Total;
8043 delete [] Inlet_Area_Total;
8044 delete [] Inlet_RamDrag_Total;
8045 delete [] Inlet_Force_Total;
8046 delete [] Inlet_Power_Total;
8047 delete [] Inlet_XCG_Total;
8048 delete [] Inlet_YCG_Total;
8049 delete [] Inlet_ZCG_Total;
8051 delete [] Inlet_MassFlow;
8052 delete [] Inlet_Mach;
8053 delete [] Inlet_MinPressure;
8054 delete [] Inlet_MaxPressure;
8055 delete [] Inlet_ReverseMassFlow;
8056 delete [] Inlet_Pressure;
8057 delete [] Inlet_TotalPressure;
8058 delete [] Inlet_Temperature;
8059 delete [] Inlet_TotalTemperature;
8060 delete [] Inlet_Area;
8061 delete [] Inlet_RamDrag;
8062 delete [] Inlet_Force;
8063 delete [] Inlet_Power;
8064 delete [] Inlet_XCG;
8065 delete [] Inlet_YCG;
8066 delete [] Inlet_ZCG;
8068 delete [] Outlet_MassFlow;
8069 delete [] Outlet_Pressure;
8070 delete [] Outlet_TotalPressure;
8071 delete [] Outlet_Temperature;
8072 delete [] Outlet_TotalTemperature;
8073 delete [] Outlet_Area;
8074 delete [] Outlet_GrossThrust;
8075 delete [] Outlet_Force;
8076 delete [] Outlet_Power;
8083 CConfig *config,
unsigned short iMesh,
bool Output) {
8085 su2double Massflow = 0.0 , Target_Massflow = 0.0, DragMinusThrust = 0.0 , Target_DragMinusThrust = 0.0, Target_NetThrust = 0.0, BCThrust = 0.0, BCThrust_inc = 0.0;
8086 unsigned short iDim, iMarker;
8087 unsigned long iVertex, iPoint;
8089 Density, T0_Ti, ATerm, BTerm, LHS, RHS, RHS_PDelta, RHS_MDelta, F, DF_DLa, CTerm_, DTerm_,
8090 ETerm, La, La_old, TotalArea, To_Ti, DeltaT, Po_Pi, DeltaP, Area, Velocity_Normal,
8091 SoundSpeed2, Force_Normal,
8092 RefDensity, RefArea, RefVel2, Factor, Ref;
8093 unsigned short iter;
8095 su2double Target_Force, Force, Target_Power, Power, NetThrust, BCThrust_old, Initial_BCThrust;
8104 unsigned long ExtIter = config->
GetExtIter();
8105 bool Update_BCThrust_Bool =
false;
8114 Factor = (0.5*RefDensity*RefArea*RefVel2);
8120 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
8128 if (config->
GetMach() < 0.5) {
8138 if (config->
GetMach() < 0.5) {
8150 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
8168 if ((iMesh ==
MESH_0) && Output) {
8172 Update_BCThrust_Bool =
false;
8176 if ((ExtIter % Iter_Fixed_NetThrust == 0) && (ExtIter != 0)) {
8183 else Update_BCThrust_Bool =
false;
8201 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
8228 if (Kind_ActDisk ==
POWER) {
8252 if (Update_BCThrust_Bool && Output) {
8254 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
8267 BCThrust_inc = (1.0/dNetThrust_dBCThrust)*(Target_NetThrust - NetThrust);
8269 if (iMesh ==
MESH_0) BCThrust = max(0.0,(BCThrust_old + BCThrust_inc));
8274 BCThrust_Init = BCThrust*Ref;
8286 BCThrust_inc = (1.0/dNetThrust_dBCThrust)*(Target_Force - Force);
8288 if (iMesh ==
MESH_0) BCThrust = max(0.0,(BCThrust_old + BCThrust_inc));
8293 BCThrust_Init = BCThrust*Ref;
8299 if (Kind_ActDisk ==
POWER) {
8305 BCThrust_inc = (1.0/dNetThrust_dBCThrust)*(Target_Power - Power);
8307 if (iMesh ==
MESH_0) BCThrust = max(0.0,(BCThrust_old + BCThrust_inc));
8312 BCThrust_Init = BCThrust*Ref;
8324 BCThrust_inc = -(1.0/dNetThrust_dBCThrust)*(Target_DragMinusThrust - DragMinusThrust);
8326 if (iMesh ==
MESH_0) BCThrust = max(0.0,(BCThrust_old + BCThrust_inc));
8331 BCThrust_Init = BCThrust*Ref;
8339 if (config->
GetMach() < 0.5) {
8350 BCThrust_inc = (1.0/dNetThrust_dBCThrust)*(Target_Massflow - Massflow);
8351 if (iMesh ==
MESH_0) BCThrust = max(0.0,(BCThrust_old + BCThrust_inc));
8355 BCThrust_Init = BCThrust*Ref;
8368 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
8385 if ((Update_BCThrust_Bool && Output) || (ExtIter == 0)) {
8387 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
8397 Factor = (0.5*RefDensity*RefArea*RefVel2);
8401 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
8424 Density = V_inlet[
nDim+2];
8425 Pressure = V_inlet[
nDim+1];
8426 SoundSpeed2 = Pressure*
Gamma/Density;
8428 Force_Normal = Area*(BCThrust/TotalArea);
8431 Velocity_Normal = 0.0;
8432 for (iDim = 0; iDim <
nDim; iDim++) {
8433 Velocity_Normal += V_inlet[iDim+1]*
Vector[iDim]/Area;
8437 if (Velocity_Normal >
EPS) {
8441 T0_Ti = 1.0 + ((
Gamma-1.0)/SoundSpeed2)*(0.5*Velocity_Normal*Velocity_Normal + Force_Normal/(Density*Area));
8444 ATerm = 2.0*T0_Ti/(
Gamma+1.0);
8446 LHS = fabs(Velocity_Normal)/(sqrt(SoundSpeed2)*pow(ATerm,BTerm));
8448 CTerm_ = (PolyCoeff-1.0)/(PolyCoeff+1.0);
8449 DTerm_ = 1.0/(PolyCoeff-1.0);
8453 for (iter = 0; iter < 100; iter++) {
8455 ETerm = ((1.0-CTerm_*La*La)/(1.0-CTerm_+
EPS));
8457 RHS = La*pow(ETerm, DTerm_);
8459 ETerm = ((1.0-CTerm_*(La+1E-6)*(La+1E-6))/(1.0-CTerm_+
EPS));
8460 RHS_PDelta = (La+1E-6)*pow(ETerm, DTerm_);
8462 ETerm = ((1.0-CTerm_*(La-1E-6)*(La-1E-6))/(1.0-CTerm_+
EPS));
8463 RHS_MDelta = (La-1E-6)*pow(ETerm, DTerm_);
8468 DF_DLa = (RHS_PDelta - RHS_MDelta)/2E-6;
8473 La = La_old - 0.75*(F/DF_DLa);
8475 if (fabs(F) < 1E-10)
break;
8479 if (iter == 99) cout <<
"The laval number evaluation is not converging." << endl;
8483 La = min(La, sqrt(6.0)); La = max(La, 0.0);
8485 To_Ti = max(1.0, T0_Ti*(1.0-CTerm_*La*La));
8488 Po_Pi = max(1.0, pow(To_Ti, PolyCoeff*DTerm_));
8508 ActDisk_Info =
false;
8509 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
8512 ActDisk_Info =
true;
8521 BCThrust = MyBCThrust;
8528 CConfig *config,
unsigned short iMesh,
bool Output) {
8530 su2double Target_CL = 0.0, AoA = 0.0, Vel_Infty[3], AoA_inc = 0.0, Vel_Infty_Mag, Old_AoA,
8531 dCL_dAlpha_, dCD_dCL_, dCMx_dCL_, dCMy_dCL_, dCMz_dCL_;
8532 unsigned long Wrt_Con_Freq;
8533 unsigned short iDim;
8538 unsigned long ExtIter = config->
GetExtIter();
8539 bool write_heads = ((ExtIter % Iter_Fixed_CL == 0) && (ExtIter != 0));
8542 bool Update_AoA =
false;
8548 if ((iMesh ==
MESH_0) && Output) {
8556 if ((ExtIter % Iter_Fixed_CL == 0) && (ExtIter != 0)) {
8558 if ((
AoA_Counter <= Update_Alpha)) Update_AoA =
true;
8559 else Update_AoA =
false;
8572 if (Update_AoA && Output) {
8584 AoA_inc = (1.0/dCL_dAlpha)*(Target_CL -
Total_CL);
8599 for (iDim = 0; iDim <
nDim; iDim++)
8605 for (iDim = 0; iDim <
nDim; iDim++)
8606 Vel_Infty_Mag += Vel_Infty[iDim]*Vel_Infty[iDim];
8607 Vel_Infty_Mag = sqrt(Vel_Infty_Mag);
8612 Vel_Infty[0] = cos(AoA)*Vel_Infty_Mag;
8613 Vel_Infty[1] = sin(AoA)*Vel_Infty_Mag;
8616 Vel_Infty[0] = cos(AoA)*cos(Beta)*Vel_Infty_Mag;
8617 Vel_Infty[1] = sin(Beta)*Vel_Infty_Mag;
8618 Vel_Infty[2] = sin(AoA)*cos(Beta)*Vel_Infty_Mag;
8623 for (iDim = 0; iDim <
nDim; iDim++) {
8630 for (iDim = 0; iDim <
nDim; iDim++)
8640 cout.setf(ios::fixed, ios::floatfield);
8641 cout << endl <<
"----------------------------- Fixed CL Mode -----------------------------" << endl;
8643 cout <<
" (target: " << config->
GetTarget_CL() <<
")." << endl;
8645 cout <<
"Previous AoA: " << Old_AoA <<
" deg";
8646 cout <<
", new AoA: " << config->
GetAoA() <<
" deg." << endl;
8647 cout <<
"-------------------------------------------------------------------------" << endl << endl;
8654 if ((config->
GetnExtIter()-Iter_dCL_dAlpha == ExtIter) && Output) {
8658 if (config->
GetnExtIter()-Iter_dCL_dAlpha == ExtIter) {
8672 if (config->
GetnExtIter()-Iter_dCL_dAlpha == ExtIter) {
8673 cout << endl <<
"----------------------------- Fixed CL Mode -----------------------------" << endl;
8674 cout <<
" Change AoA by +0.001 deg to evaluate gradient." << endl;
8675 cout <<
"-------------------------------------------------------------------------" << endl << endl;
8683 else { AoA = config->
GetAoA(); }
8691 for (iDim = 0; iDim <
nDim; iDim++)
8696 Vel_Infty_Mag = 0.0;
8697 for (iDim = 0; iDim <
nDim; iDim++)
8698 Vel_Infty_Mag += Vel_Infty[iDim]*Vel_Infty[iDim];
8699 Vel_Infty_Mag = sqrt(Vel_Infty_Mag);
8704 Vel_Infty[0] = cos(AoA*
PI_NUMBER/180.0)*Vel_Infty_Mag;
8705 Vel_Infty[1] = sin(AoA*
PI_NUMBER/180.0)*Vel_Infty_Mag;
8708 Vel_Infty[0] = cos(AoA*
PI_NUMBER/180.0)*cos(Beta)*Vel_Infty_Mag;
8709 Vel_Infty[1] = sin(Beta)*Vel_Infty_Mag;
8710 Vel_Infty[2] = sin(AoA*
PI_NUMBER/180.0)*cos(Beta)*Vel_Infty_Mag;
8715 for (iDim = 0; iDim <
nDim; iDim++) {
8722 for (iDim = 0; iDim <
nDim; iDim++)
8754 cout << endl <<
"----------------------------- Fixed CL Mode -----------------------------" << endl;
8755 cout <<
"Approx. Delta CL / Delta AoA: " << dCL_dAlpha_ <<
" (1/deg)." << endl;
8756 cout <<
"Approx. Delta CD / Delta CL: " << dCD_dCL_ <<
". " << endl;
8758 cout <<
"Approx. Delta CMx / Delta CL: " << dCMx_dCL_ <<
". " << endl;
8759 cout <<
"Approx. Delta CMy / Delta CL: " << dCMy_dCL_ <<
". " << endl;
8761 cout <<
"Approx. Delta CMz / Delta CL: " << dCMz_dCL_ <<
". " << endl;
8762 cout <<
"-------------------------------------------------------------------------" << endl << endl;
8770 unsigned short iMarker,
8771 unsigned long iVertex) {
8775 unsigned short T_position =
nDim;
8776 unsigned short P_position =
nDim+1;
8777 unsigned short FlowDir_position =
nDim+2;
8782 for (
unsigned short iDim = 0; iDim <
nDim; iDim++) {
8783 norm += pow(val_inlet[FlowDir_position + iDim], 2);
8791 if (abs(norm - 1.0) > 1e-6) {
8792 ostringstream error_msg;
8793 error_msg <<
"ERROR: Found these values in columns ";
8794 error_msg << FlowDir_position <<
" - ";
8795 error_msg << FlowDir_position +
nDim - 1 << endl;
8796 error_msg << std::scientific;
8797 error_msg <<
" [" << val_inlet[FlowDir_position];
8798 error_msg <<
", " << val_inlet[FlowDir_position + 1];
8799 if (
nDim == 3) error_msg <<
", " << val_inlet[FlowDir_position + 2];
8800 error_msg <<
"]" << endl;
8801 error_msg <<
" These values should be components of a unit vector for direction," << endl;
8802 error_msg <<
" but their magnitude is: " << norm << endl;
8808 Inlet_Ttotal[iMarker][iVertex] = val_inlet[T_position];
8809 Inlet_Ptotal[iMarker][iVertex] = val_inlet[P_position];
8810 for (
unsigned short iDim = 0; iDim <
nDim; iDim++) {
8811 Inlet_FlowDir[iMarker][iVertex][iDim] = val_inlet[FlowDir_position + iDim];
8817 unsigned long val_inlet_point,
8818 unsigned short val_kind_marker,
8825 unsigned short iMarker, iDim;
8826 unsigned long iPoint, iVertex;
8832 unsigned short T_position =
nDim;
8833 unsigned short P_position =
nDim+1;
8834 unsigned short FlowDir_position =
nDim+2;
8838 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
8842 for (iVertex = 0; iVertex <
nVertex[iMarker]; iVertex++){
8846 if (iPoint == val_inlet_point) {
8852 for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim];
8857 val_inlet[T_position] =
Inlet_Ttotal[iMarker][iVertex];
8858 val_inlet[P_position] =
Inlet_Ptotal[iMarker][iVertex];
8859 for (iDim = 0; iDim <
nDim; iDim++) {
8860 val_inlet[FlowDir_position + iDim] =
Inlet_FlowDir[iMarker][iVertex][iDim];
8890 for (
unsigned long iVertex=0; iVertex <
nVertex[iMarker]; iVertex++){
8893 for (
unsigned short iDim = 0; iDim <
nDim; iDim++)
8902 for (
unsigned long iVertex=0; iVertex <
nVertex[iMarker]; iVertex++){
8905 for (
unsigned short iDim = 0; iDim <
nDim; iDim++)
8914 unsigned short nMGlevel, iMarker;
8919 for (iMarker=0; iMarker <
nMarker; iMarker++) {
8922 if (isCustomizable && isInlet)
8930 unsigned short iMarker_Monitoring, Kind_ObjFunc;
8937 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
8942 switch(Kind_ObjFunc) {
9002 switch(Kind_ObjFunc) {
9066 unsigned short iDim, iVar, jVar, kVar, jDim;
9067 unsigned long iPoint, iVertex;
9068 su2double *Normal = NULL, *GridVel = NULL, Area, UnitNormal[3], *NormalArea,
9069 ProjGridVel = 0.0, turb_ke;
9070 su2double Density_b, StaticEnergy_b, Enthalpy_b, *Velocity_b, Kappa_b, Chi_b, Energy_b, VelMagnitude2_b, Pressure_b;
9071 su2double Density_i, *Velocity_i, ProjVelocity_i = 0.0, Energy_i, VelMagnitude2_i;
9085 for (iVar = 0; iVar <
nVar; iVar++) {
9092 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
9104 for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim];
9107 for (iDim = 0; iDim <
nDim; iDim++) {
9108 NormalArea[iDim] = -Normal[iDim];
9109 UnitNormal[iDim] = -Normal[iDim]/Area;
9114 VelMagnitude2_i = 0.0; ProjVelocity_i = 0.0;
9115 for (iDim = 0; iDim <
nDim; iDim++) {
9117 ProjVelocity_i += Velocity_i[iDim]*UnitNormal[iDim];
9118 VelMagnitude2_i += Velocity_i[iDim]*Velocity_i[iDim];
9125 for (iDim = 0; iDim <
nDim; iDim++)
9126 Velocity_b[iDim] = Velocity_i[iDim] - ProjVelocity_i * UnitNormal[iDim];
9128 if (grid_movement) {
9131 for (iDim = 0; iDim <
nDim; iDim++) ProjGridVel += GridVel[iDim]*UnitNormal[iDim];
9132 for (iDim = 0; iDim <
nDim; iDim++) Velocity_b[iDim] += GridVel[iDim] - ProjGridVel * UnitNormal[iDim];
9135 VelMagnitude2_b = 0.0;
9136 for (iDim = 0; iDim <
nDim; iDim++)
9137 VelMagnitude2_b += Velocity_b[iDim] * Velocity_b[iDim];
9144 Density_b = Density_i;
9145 StaticEnergy_b = Energy_i - 0.5 * VelMagnitude2_i - turb_ke;
9146 Energy_b = StaticEnergy_b + 0.5 * VelMagnitude2_b + turb_ke;
9152 Enthalpy_b = Energy_b + Pressure_b/Density_b;
9157 if (grid_movement) {
9160 for (iDim = 0; iDim <
nDim; iDim++)
9161 ProjGridVel += GridVel[iDim]*UnitNormal[iDim];
9168 for (iDim = 0; iDim <
nDim; iDim++)
9169 Residual[iDim+1] += (2.0/3.0)*Density_b*turb_ke*NormalArea[iDim];
9182 for (iVar = 0; iVar <
nVar; iVar++) {
9183 for (jVar = 0; jVar <
nVar; jVar++)
9189 for (iVar = 0; iVar <
nVar; iVar++) {
9190 for (jVar = 0; jVar <
nVar; jVar++)
9191 DubDu[iVar][jVar]= 0.0;
9192 DubDu[iVar][iVar]= 1.0;
9195 for (iDim = 0; iDim <
nDim; iDim++)
9196 for (jDim = 0; jDim<
nDim; jDim++)
9197 DubDu[iDim+1][jDim+1] -= UnitNormal[iDim]*UnitNormal[jDim];
9198 DubDu[
nVar-1][0] += 0.5*ProjVelocity_i*ProjVelocity_i;
9199 for (iDim = 0; iDim <
nDim; iDim++) {
9200 DubDu[
nVar-1][iDim+1] -= ProjVelocity_i*UnitNormal[iDim];
9205 numerics->
GetInviscidProjJac(Velocity_b, &Enthalpy_b, &Chi_b, &Kappa_b, NormalArea, 1, Jacobian_b);
9216 for (iVar = 0; iVar <
nVar; iVar++)
9217 for (jVar = 0; jVar <
nVar; jVar++)
9218 for (kVar = 0; kVar <
nVar; kVar++)
9219 Jacobian_i[iVar][jVar] += Jacobian_b[iVar][kVar] * DubDu[kVar][jVar];
9230 delete [] NormalArea;
9231 delete [] Velocity_b;
9232 delete [] Velocity_i;
9233 for (iVar = 0; iVar <
nVar; iVar++) {
9234 delete [] Jacobian_b[iVar];
9235 delete [] DubDu[iVar];
9237 delete [] Jacobian_b;
9245 unsigned short iDim, iVar, jVar, kVar, jDim;
9246 unsigned long iPoint, iVertex;
9247 su2double *Normal = NULL, *GridVel = NULL, Area, UnitNormal[3], *NormalArea,
9248 ProjGridVel = 0.0, turb_ke;
9249 su2double Density_b, StaticEnergy_b, Enthalpy_b, *Velocity_b, Kappa_b, Chi_b, Energy_b, VelMagnitude2_b, Pressure_b;
9250 su2double Density_i, *Velocity_i, ProjVelocity_i = 0.0, Energy_i, VelMagnitude2_i, VelEps;
9264 for (iVar = 0; iVar <
nVar; iVar++) {
9275 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
9287 for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim];
9290 for (iDim = 0; iDim <
nDim; iDim++) {
9291 NormalArea[iDim] = -Normal[iDim];
9292 UnitNormal[iDim] = -Normal[iDim]/Area;
9297 VelMagnitude2_i = 0.0; ProjVelocity_i = 0.0;
9298 for (iDim = 0; iDim <
nDim; iDim++) {
9300 ProjVelocity_i += Velocity_i[iDim]*UnitNormal[iDim];
9301 VelMagnitude2_i += Velocity_i[iDim]*Velocity_i[iDim];
9308 for (iDim = 0; iDim <
nDim; iDim++)
9309 Velocity_b[iDim] = Velocity_i[iDim] - (ProjVelocity_i + VelEps) * UnitNormal[iDim];
9311 if (grid_movement) {
9314 for (iDim = 0; iDim <
nDim; iDim++) ProjGridVel += GridVel[iDim]*UnitNormal[iDim];
9315 for (iDim = 0; iDim <
nDim; iDim++) Velocity_b[iDim] += GridVel[iDim] - ProjGridVel * UnitNormal[iDim];
9318 VelMagnitude2_b = 0.0;
9319 for (iDim = 0; iDim <
nDim; iDim++)
9320 VelMagnitude2_b += Velocity_b[iDim] * Velocity_b[iDim];
9327 Density_b = Density_i;
9328 StaticEnergy_b = Energy_i - 0.5 * VelMagnitude2_i - turb_ke;
9329 Energy_b = StaticEnergy_b + 0.5 * VelMagnitude2_b + turb_ke;
9335 Enthalpy_b = Energy_b + Pressure_b/Density_b;
9340 if (grid_movement) {
9343 for (iDim = 0; iDim <
nDim; iDim++)
9344 ProjGridVel += GridVel[iDim]*UnitNormal[iDim];
9351 for (iDim = 0; iDim <
nDim; iDim++)
9352 Residual[iDim+1] += (2.0/3.0)*Density_b*turb_ke*NormalArea[iDim];
9365 for (iVar = 0; iVar <
nVar; iVar++) {
9366 for (jVar = 0; jVar <
nVar; jVar++)
9372 for (iVar = 0; iVar <
nVar; iVar++) {
9373 for (jVar = 0; jVar <
nVar; jVar++)
9374 DubDu[iVar][jVar]= 0.0;
9375 DubDu[iVar][iVar]= 1.0;
9378 for (iDim = 0; iDim <
nDim; iDim++)
9379 for (jDim = 0; jDim<
nDim; jDim++)
9380 DubDu[iDim+1][jDim+1] -= UnitNormal[iDim]*UnitNormal[jDim];
9381 DubDu[
nVar-1][0] += 0.5*ProjVelocity_i*ProjVelocity_i;
9382 for (iDim = 0; iDim <
nDim; iDim++) {
9383 DubDu[
nVar-1][iDim+1] -= ProjVelocity_i*UnitNormal[iDim];
9388 numerics->
GetInviscidProjJac(Velocity_b, &Enthalpy_b, &Chi_b, &Kappa_b, NormalArea, 1, Jacobian_b);
9399 for (iVar = 0; iVar <
nVar; iVar++)
9400 for (jVar = 0; jVar <
nVar; jVar++)
9401 for (kVar = 0; kVar <
nVar; kVar++)
9402 Jacobian_i[iVar][jVar] += Jacobian_b[iVar][kVar] * DubDu[kVar][jVar];
9413 delete [] NormalArea;
9414 delete [] Velocity_b;
9415 delete [] Velocity_i;
9416 for (iVar = 0; iVar <
nVar; iVar++) {
9417 delete [] Jacobian_b[iVar];
9418 delete [] DubDu[iVar];
9420 delete [] Jacobian_b;
9428 unsigned short iDim;
9429 unsigned long iVertex, iPoint, Point_Normal;
9432 su2double Area, UnitNormal[3] = {0.0,0.0,0.0};
9433 su2double Density, Pressure, Energy, Velocity[3] = {0.0,0.0,0.0};
9434 su2double Density_Bound, Pressure_Bound, Vel_Bound[3] = {0.0,0.0,0.0};
9435 su2double Density_Infty, Pressure_Infty, Vel_Infty[3] = {0.0,0.0,0.0};
9436 su2double SoundSpeed, Entropy, Velocity2, Vn;
9437 su2double SoundSpeed_Bound, Entropy_Bound, Vel2_Bound, Vn_Bound;
9438 su2double SoundSpeed_Infty, Entropy_Infty, Vel2_Infty, Vn_Infty, Qn_Infty;
9455 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
9472 for (iDim = 0; iDim <
nDim; iDim++) Normal[iDim] = -Normal[iDim];
9488 for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim];
9491 for (iDim = 0; iDim <
nDim; iDim++)
9492 UnitNormal[iDim] = Normal[iDim]/Area;
9500 Density_Bound = V_domain[
nDim+2];
9501 Vel2_Bound = 0.0; Vn_Bound = 0.0;
9502 for (iDim = 0; iDim <
nDim; iDim++) {
9503 Vel_Bound[iDim] = V_domain[iDim+1];
9504 Vel2_Bound += Vel_Bound[iDim]*Vel_Bound[iDim];
9505 Vn_Bound += Vel_Bound[iDim]*UnitNormal[iDim];
9508 SoundSpeed_Bound = sqrt(
Gamma*Pressure_Bound/Density_Bound);
9509 Entropy_Bound = pow(Density_Bound,
Gamma)/Pressure_Bound;
9516 Vel2_Infty = 0.0; Vn_Infty = 0.0;
9517 for (iDim = 0; iDim <
nDim; iDim++) {
9519 Vel2_Infty += Vel_Infty[iDim]*Vel_Infty[iDim];
9520 Vn_Infty += Vel_Infty[iDim]*UnitNormal[iDim];
9523 SoundSpeed_Infty = sqrt(
Gamma*Pressure_Infty/Density_Infty);
9524 Entropy_Infty = pow(Density_Infty,
Gamma)/Pressure_Infty;
9528 Qn_Infty = Vn_Infty;
9529 if (grid_movement) {
9531 for (iDim = 0; iDim <
nDim; iDim++)
9532 Qn_Infty -= GridVel[iDim]*UnitNormal[iDim];
9548 if (Qn_Infty > -SoundSpeed_Infty) {
9558 if (Qn_Infty > SoundSpeed_Infty) {
9569 Vn = 0.5 * (RiemannPlus + RiemannMinus);
9580 if (Qn_Infty > 0.0) {
9582 for (iDim = 0; iDim <
nDim; iDim++)
9583 Velocity[iDim] = Vel_Bound[iDim] + (Vn-Vn_Bound)*UnitNormal[iDim];
9584 Entropy = Entropy_Bound;
9587 for (iDim = 0; iDim <
nDim; iDim++)
9588 Velocity[iDim] = Vel_Infty[iDim] + (Vn-Vn_Infty)*UnitNormal[iDim];
9589 Entropy = Entropy_Infty;
9596 for (iDim = 0; iDim <
nDim; iDim++) {
9597 Velocity2 += Velocity[iDim]*Velocity[iDim];
9599 Pressure = Density*SoundSpeed*SoundSpeed/
Gamma;
9605 V_infty[0] = Pressure/(Gas_Constant*Density);
9606 for (iDim = 0; iDim <
nDim; iDim++)
9607 V_infty[iDim+1] = Velocity[iDim];
9608 V_infty[
nDim+1] = Pressure;
9609 V_infty[
nDim+2] = Density;
9610 V_infty[
nDim+3] = Energy + Pressure/Density;
9618 if (grid_movement) {
9694 unsigned short iDim, iVar, jVar, kVar;
9695 unsigned long iVertex, iPoint, Point_Normal;
9696 su2double P_Total, T_Total, P_static, T_static, Rho_static, *Mach, *Flow_Dir, Area, UnitNormal[3];
9697 su2double *Velocity_b, Velocity2_b, Enthalpy_b, Energy_b, StaticEnergy_b, Density_b, Kappa_b, Chi_b, Pressure_b, Temperature_b;
9698 su2double *Velocity_e, Velocity2_e, VelMag_e, Enthalpy_e, Entropy_e, Energy_e = 0.0, StaticEnthalpy_e, StaticEnergy_e, Density_e = 0.0, Pressure_e;
9699 su2double *Velocity_i, Velocity2_i, Enthalpy_i, Energy_i, StaticEnergy_i, Density_i, Kappa_i, Chi_i, Pressure_i, SoundSpeed_i;
9701 su2double **P_Tensor, **invP_Tensor, *Lambda_i, **Jacobian_b, **DubDu, *dw, *u_e, *u_i, *u_b;
9703 su2double *V_boundary, *V_domain, *S_boundary, *S_domain;
9713 su2double *Normal, *FlowDirMix, TangVelocity, NormalVelocity;
9730 for (iVar = 0; iVar <
nVar; iVar++)
9737 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
9751 for (iDim = 0; iDim <
nDim; iDim++) Normal[iDim] = -Normal[iDim];
9755 for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim];
9758 for (iDim = 0; iDim <
nDim; iDim++)
9759 UnitNormal[iDim] = Normal[iDim]/Area;
9766 for (iDim=0; iDim <
nDim; iDim++)
9769 Velocity2_i += Velocity_i[iDim]*Velocity_i[iDim];
9776 StaticEnergy_i = Energy_i - 0.5*Velocity2_i;
9781 Enthalpy_i = Energy_i + Pressure_i/Density_i;
9788 ProjVelocity_i = 0.0;
9789 for (iDim = 0; iDim <
nDim; iDim++)
9790 ProjVelocity_i += Velocity_i[iDim]*UnitNormal[iDim];
9814 Velocity2_e = Velocity2_i;
9816 NormalVelocity= -sqrt(Velocity2_e)*Flow_Dir[0];
9817 TangVelocity= -sqrt(Velocity2_e)*Flow_Dir[1];
9818 Velocity_e[0]= UnitNormal[0]*NormalVelocity - UnitNormal[1]*TangVelocity;
9819 Velocity_e[1]= UnitNormal[1]*NormalVelocity + UnitNormal[0]*TangVelocity;
9821 for (iDim = 0; iDim <
nDim; iDim++)
9822 Velocity_e[iDim] = sqrt(Velocity2_e)*Flow_Dir[iDim];
9824 StaticEnthalpy_e = Enthalpy_e - 0.5 * Velocity2_e;
9828 Energy_e = StaticEnergy_e + 0.5 * Velocity2_e;
9849 for (iDim = 0; iDim <
nDim; iDim++) {
9851 Velocity2_e += Velocity_e[iDim]*Velocity_e[iDim];
9855 Energy_e = StaticEnergy_e + 0.5 * Velocity2_e;
9877 for (iDim = 0; iDim <
nDim; iDim++) {
9879 Velocity2_e += Velocity_e[iDim]*Velocity_e[iDim];
9883 Energy_e = StaticEnergy_e + 0.5 * Velocity2_e;
9898 for (iDim = 0; iDim <
nDim; iDim++)
9899 Velocity_e[iDim] = VelMag_e*Flow_Dir[iDim];
9900 Energy_e = Energy_i;
9908 Density_e = Density_i;
9913 for (iDim = 0; iDim <
nDim; iDim++) {
9914 Velocity_e[iDim] = Velocity_i[iDim];
9915 Velocity2_e += Velocity_e[iDim]*Velocity_e[iDim];
9926 conv_numerics->
GetPMatrix(&Density_i, Velocity_i, &SoundSpeed_i, &Enthalpy_i, &Chi_i, &Kappa_i, UnitNormal, P_Tensor);
9929 conv_numerics->
GetPMatrix_inv(invP_Tensor, &Density_i, Velocity_i, &SoundSpeed_i, &Chi_i, &Kappa_i, UnitNormal);
9932 if (grid_movement) {
9936 for (iDim = 0; iDim <
nDim; iDim++)
9937 ProjGridVel += gridVel[iDim]*UnitNormal[iDim];
9938 ProjVelocity_i -= ProjGridVel;
9942 for (iDim = 0; iDim <
nDim; iDim++)
9943 Lambda_i[iDim] = ProjVelocity_i;
9944 Lambda_i[
nVar-2] = ProjVelocity_i + SoundSpeed_i;
9945 Lambda_i[
nVar-1] = ProjVelocity_i - SoundSpeed_i;
9949 for (iDim = 0; iDim <
nDim; iDim++)
9950 u_e[iDim+1] = Velocity_e[iDim]*Density_e;
9951 u_e[
nVar-1] = Energy_e*Density_e;
9955 for (iDim = 0; iDim <
nDim; iDim++)
9956 u_i[iDim+1] = Velocity_i[iDim]*Density_i;
9957 u_i[
nVar-1] = Energy_i*Density_i;
9960 for (iVar = 0; iVar <
nVar; iVar++)
9963 for (jVar = 0; jVar <
nVar; jVar++)
9964 dw[iVar] += invP_Tensor[iVar][jVar] * (u_e[jVar] - u_i[jVar]);
9969 for (iVar = 0; iVar <
nVar; iVar++)
9971 u_b[iVar] = u_i[iVar];
9973 for (jVar = 0; jVar <
nVar; jVar++)
9975 if (Lambda_i[jVar] < 0)
9977 u_b[iVar] += P_Tensor[iVar][jVar]*dw[jVar];
9987 for (iDim = 0; iDim <
nDim; iDim++)
9989 Velocity_b[iDim] = u_b[iDim+1]/Density_b;
9990 Velocity2_b += Velocity_b[iDim]*Velocity_b[iDim];
9992 Energy_b = u_b[
nVar-1]/Density_b;
9993 StaticEnergy_b = Energy_b - 0.5*Velocity2_b;
9997 Enthalpy_b = Energy_b + Pressure_b/Density_b;
10005 if (grid_movement) {
10009 for (iDim = 0; iDim <
nDim; iDim++)
10010 projVelocity += gridVel[iDim]*Normal[iDim];
10011 for (iVar = 0; iVar <
nVar; iVar++)
10012 Residual[iVar] -= projVelocity *(u_b[iVar]);
10019 for (iVar = 0; iVar <
nVar; iVar++)
10027 for (iVar = 0; iVar <
nVar; iVar++)
10029 for (jVar = 0; jVar <
nVar; jVar++)
10030 DubDu[iVar][jVar]= 0;
10032 DubDu[iVar][iVar]= 1;
10036 for (iVar=0; iVar<
nVar; iVar++)
10038 for (jVar=0; jVar<
nVar; jVar++)
10040 for (kVar=0; kVar<
nVar; kVar++)
10042 if (Lambda_i[kVar]<0)
10043 DubDu[iVar][jVar] -= P_Tensor[iVar][kVar] * invP_Tensor[kVar][jVar];
10049 conv_numerics->
GetInviscidProjJac(Velocity_b, &Enthalpy_b, &Chi_b, &Kappa_b, Normal, 1.0, Jacobian_b);
10056 for (iDim = 0; iDim <
nDim; iDim++)
10057 projVelocity += gridVel[iDim]*Normal[iDim];
10058 for (iVar = 0; iVar <
nVar; iVar++) {
10059 Residual[iVar] -= projVelocity *(u_b[iVar]);
10060 Jacobian_b[iVar][iVar] -= projVelocity;
10066 for (iVar=0; iVar<
nVar; iVar++)
10067 for (jVar=0; jVar<
nVar; jVar++)
10071 for (iVar=0; iVar<
nVar; iVar++) {
10072 for (jVar=0; jVar<
nVar; jVar++) {
10073 for (kVar=0; kVar<
nVar; kVar++) {
10074 Jacobian_i[iVar][jVar] += Jacobian_b[iVar][kVar] * DubDu[kVar][jVar];
10079 for (iVar = 0; iVar <
nVar; iVar++) {
10080 delete [] Jacobian_b[iVar];
10081 delete [] DubDu[iVar];
10083 delete [] Jacobian_b;
10104 V_boundary[0] = Temperature_b;
10105 for (iDim = 0; iDim <
nDim; iDim++)
10106 V_boundary[iDim+1] = Velocity_b[iDim];
10107 V_boundary[
nDim+1] = Pressure_b;
10108 V_boundary[
nDim+2] = Density_b;
10109 V_boundary[
nDim+3] = Enthalpy_b;
10176 delete [] Velocity_e;
10177 delete [] Velocity_b;
10178 delete [] Velocity_i;
10179 delete [] FlowDirMix;
10181 delete [] S_boundary;
10182 delete [] Lambda_i;
10189 for (iVar = 0; iVar <
nVar; iVar++)
10191 delete [] P_Tensor[iVar];
10192 delete [] invP_Tensor[iVar];
10194 delete [] P_Tensor;
10195 delete [] invP_Tensor;
10202 unsigned short iDim, iVar, jVar, kVar, iSpan;
10203 unsigned long iPoint, Point_Normal, oldVertex;
10206 su2double *Velocity_b, Velocity2_b, Enthalpy_b, Energy_b, StaticEnergy_b, Density_b, Kappa_b, Chi_b, Pressure_b, Temperature_b;
10207 su2double *Velocity_e, Velocity2_e, Enthalpy_e, Entropy_e, Energy_e = 0.0, StaticEnthalpy_e, StaticEnergy_e, Density_e = 0.0, Pressure_e;
10208 su2double *Velocity_i, Velocity2_i, Enthalpy_i, Energy_i, StaticEnergy_i, Density_i, Kappa_i, Chi_i, Pressure_i, SoundSpeed_i;
10210 su2double **P_Tensor, **invP_Tensor, *Lambda_i, **Jacobian_b, **DubDu, *dw, *u_e, *u_i, *u_b;
10212 su2double *V_boundary, *V_domain, *S_boundary, *S_domain;
10213 su2double AverageEnthalpy, AverageEntropy;
10214 unsigned short iZone = config->
GetiZone();
10224 su2double *Normal, *turboNormal, *UnitNormal, *FlowDirMix, FlowDirMixMag, *turboVelocity;
10244 for (iVar = 0; iVar <
nVar; iVar++)
10252 for (iVertex = 0; iVertex < geometry->
nVertexSpan[val_marker][iSpan]; iVertex++) {
10264 for (iDim = 0; iDim <
nDim; iDim++) Normal[iDim] = -Normal[iDim];
10280 for (iDim=0; iDim <
nDim; iDim++)
10283 Velocity2_i += Velocity_i[iDim]*Velocity_i[iDim];
10289 StaticEnergy_i = Energy_i - 0.5*Velocity2_i;
10294 Enthalpy_i = Energy_i + Pressure_i/Density_i;
10301 ProjVelocity_i = 0.0;
10302 for (iDim = 0; iDim <
nDim; iDim++)
10303 ProjVelocity_i += Velocity_i[iDim]*UnitNormal[iDim];
10330 Velocity2_e = Velocity2_i;
10331 for (iDim = 0; iDim <
nDim; iDim++)
10332 turboVelocity[iDim] = sqrt(Velocity2_e)*Flow_Dir[iDim];
10334 StaticEnthalpy_e = Enthalpy_e - 0.5 * Velocity2_e;
10338 Energy_e = StaticEnergy_e + 0.5 * Velocity2_e;
10350 for (iDim = 0; iDim <
nDim; iDim++)
10352 for (iDim = 0; iDim <
nDim; iDim++){
10358 Enthalpy_e = AverageEnthalpy;
10359 Entropy_e = AverageEntropy;
10362 Velocity2_e = Velocity2_i;
10363 for (iDim = 0; iDim <
nDim; iDim++){
10364 turboVelocity[iDim] = sqrt(Velocity2_e)*FlowDirMix[iDim];
10369 StaticEnthalpy_e = Enthalpy_e - 0.5 * Velocity2_e;
10373 Energy_e = StaticEnergy_e + 0.5 * Velocity2_e;
10382 Density_e = Density_i;
10387 for (iDim = 0; iDim <
nDim; iDim++) {
10388 Velocity_e[iDim] = Velocity_i[iDim];
10389 Velocity2_e += Velocity_e[iDim]*Velocity_e[iDim];
10399 Density_e = Density_i;
10404 for (iDim = 0; iDim <
nDim; iDim++) {
10405 Velocity_e[iDim] = Velocity_i[iDim];
10406 Velocity2_e += Velocity_e[iDim]*Velocity_e[iDim];
10416 Density_e = Density_i;
10421 for (iDim = 0; iDim <
nDim; iDim++) {
10422 Velocity_e[iDim] = Velocity_i[iDim];
10423 Velocity2_e += Velocity_e[iDim]*Velocity_e[iDim];
10434 conv_numerics->
GetPMatrix(&Density_i, Velocity_i, &SoundSpeed_i, &Enthalpy_i, &Chi_i, &Kappa_i, UnitNormal, P_Tensor);
10437 conv_numerics->
GetPMatrix_inv(invP_Tensor, &Density_i, Velocity_i, &SoundSpeed_i, &Chi_i, &Kappa_i, UnitNormal);
10440 if (grid_movement){
10444 for (iDim = 0; iDim <
nDim; iDim++)
10445 ProjGridVel += gridVel[iDim]*UnitNormal[iDim];
10446 ProjVelocity_i -= ProjGridVel;
10450 for (iDim = 0; iDim <
nDim; iDim++)
10451 Lambda_i[iDim] = ProjVelocity_i;
10452 Lambda_i[
nVar-2] = ProjVelocity_i + SoundSpeed_i;
10453 Lambda_i[
nVar-1] = ProjVelocity_i - SoundSpeed_i;
10456 u_e[0] = Density_e;
10457 for (iDim = 0; iDim <
nDim; iDim++)
10458 u_e[iDim+1] = Velocity_e[iDim]*Density_e;
10459 u_e[
nVar-1] = Energy_e*Density_e;
10462 u_i[0] = Density_i;
10463 for (iDim = 0; iDim <
nDim; iDim++)
10464 u_i[iDim+1] = Velocity_i[iDim]*Density_i;
10465 u_i[
nVar-1] = Energy_i*Density_i;
10468 for (iVar = 0; iVar <
nVar; iVar++)
10471 for (jVar = 0; jVar <
nVar; jVar++)
10472 dw[iVar] += invP_Tensor[iVar][jVar] * (u_e[jVar] - u_i[jVar]);
10477 for (iVar = 0; iVar <
nVar; iVar++)
10479 u_b[iVar] = u_i[iVar];
10481 for (jVar = 0; jVar <
nVar; jVar++)
10483 if (Lambda_i[jVar] < 0)
10485 u_b[iVar] += P_Tensor[iVar][jVar]*dw[jVar];
10493 Density_b = u_b[0];
10495 for (iDim = 0; iDim <
nDim; iDim++)
10497 Velocity_b[iDim] = u_b[iDim+1]/Density_b;
10498 Velocity2_b += Velocity_b[iDim]*Velocity_b[iDim];
10500 Energy_b = u_b[
nVar-1]/Density_b;
10501 StaticEnergy_b = Energy_b - 0.5*Velocity2_b;
10505 Enthalpy_b = Energy_b + Pressure_b/Density_b;
10513 if (grid_movement) {
10517 for (iDim = 0; iDim <
nDim; iDim++)
10518 projVelocity += gridVel[iDim]*Normal[iDim];
10519 for (iVar = 0; iVar <
nVar; iVar++)
10520 Residual[iVar] -= projVelocity *(u_b[iVar]);
10527 for (iVar = 0; iVar <
nVar; iVar++)
10535 for (iVar = 0; iVar <
nVar; iVar++)
10537 for (jVar = 0; jVar <
nVar; jVar++)
10538 DubDu[iVar][jVar]= 0;
10540 DubDu[iVar][iVar]= 1;
10544 for (iVar=0; iVar<
nVar; iVar++)
10546 for (jVar=0; jVar<
nVar; jVar++)
10548 for (kVar=0; kVar<
nVar; kVar++)
10550 if (Lambda_i[kVar]<0)
10551 DubDu[iVar][jVar] -= P_Tensor[iVar][kVar] * invP_Tensor[kVar][jVar];
10557 conv_numerics->
GetInviscidProjJac(Velocity_b, &Enthalpy_b, &Chi_b, &Kappa_b, Normal, 1.0, Jacobian_b);
10564 for (iDim = 0; iDim <
nDim; iDim++)
10565 projVelocity += gridVel[iDim]*Normal[iDim];
10566 for (iVar = 0; iVar <
nVar; iVar++){
10567 Residual[iVar] -= projVelocity *(u_b[iVar]);
10568 Jacobian_b[iVar][iVar] -= projVelocity;
10574 for (iVar=0; iVar<
nVar; iVar++)
10575 for (jVar=0; jVar<
nVar; jVar++)
10579 for (iVar=0; iVar<
nVar; iVar++) {
10580 for (jVar=0; jVar<
nVar; jVar++) {
10581 for (kVar=0; kVar<
nVar; kVar++) {
10582 Jacobian_i[iVar][jVar] += Jacobian_b[iVar][kVar] * DubDu[kVar][jVar];
10587 for (iVar = 0; iVar <
nVar; iVar++) {
10588 delete [] Jacobian_b[iVar];
10589 delete [] DubDu[iVar];
10591 delete [] Jacobian_b;
10612 V_boundary[0] = Temperature_b;
10613 for (iDim = 0; iDim <
nDim; iDim++)
10614 V_boundary[iDim+1] = Velocity_b[iDim];
10615 V_boundary[
nDim+1] = Pressure_b;
10616 V_boundary[
nDim+2] = Density_b;
10617 V_boundary[
nDim+3] = Enthalpy_b;
10684 delete [] UnitNormal;
10685 delete [] turboNormal;
10686 delete [] turboVelocity;
10687 delete [] Velocity_e;
10688 delete [] Velocity_b;
10689 delete [] Velocity_i;
10690 delete [] FlowDirMix;
10692 delete [] S_boundary;
10693 delete [] Lambda_i;
10700 for (iVar = 0; iVar <
nVar; iVar++)
10702 delete [] P_Tensor[iVar];
10703 delete [] invP_Tensor[iVar];
10705 delete [] P_Tensor;
10706 delete [] invP_Tensor;
10712 su2double cj_inf,cj_out1, cj_out2, Density_i, Pressure_i, *turboNormal, *turboVelocity, *Velocity_i, AverageSoundSpeed;
10713 su2double *deltaprim, *cj, TwoPiThetaFreq_Pitch, pitch, theta, deltaTheta;
10714 unsigned short iMarker, iSpan, iMarkerTP, iDim;
10715 unsigned long iPoint, kend_max, k;
10716 long iVertex, freq;
10717 unsigned short iZone = config->
GetiZone();
10724 complex<su2double> I, cktemp_inf,cktemp_out1, cktemp_out2, expArg;
10725 I = complex<su2double>(0.0,1.0);
10728 su2double MyIm_inf, MyRe_inf, Im_inf, Re_inf, MyIm_out1, MyRe_out1, Im_out1, Re_out1, MyIm_out2, MyRe_out2, Im_out2, Re_out2;
10733 for(k=0; k < 2*kend_max+1; k++){
10734 freq = k - kend_max;
10735 cktemp_inf = complex<su2double>(0.0,0.0);
10736 cktemp_out1 = complex<su2double>(0.0,0.0);
10737 cktemp_out2 = complex<su2double>(0.0,0.0);
10738 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++){
10742 for (iVertex = 0; iVertex < geometry->
nVertexSpan[iMarker][iSpan]; iVertex++) {
10752 for (iDim = 0; iDim <
nDim; iDim++)
10792 TwoPiThetaFreq_Pitch = 2*
PI_NUMBER*freq*theta/pitch;
10794 expArg = complex<su2double>(cos(TwoPiThetaFreq_Pitch)) - I*complex<su2double>(sin(TwoPiThetaFreq_Pitch));
10796 cktemp_out1 += cj_out1*expArg*deltaTheta/pitch;
10797 cktemp_out2 += cj_out2*expArg*deltaTheta/pitch;
10798 cktemp_inf += cj_inf*expArg*deltaTheta/pitch;
10801 cktemp_inf += complex<su2double>(0.0,0.0);
10802 cktemp_out1 += complex<su2double>(0.0,0.0);
10803 cktemp_out2 += complex<su2double>(0.0,0.0);
10813 MyRe_inf = cktemp_inf.real(); Re_inf = 0.0;
10814 MyIm_inf = cktemp_inf.imag(); Im_inf = 0.0;
10815 cktemp_inf = complex<su2double>(0.0,0.0);
10817 MyRe_out1 = cktemp_out1.real(); Re_out1 = 0.0;
10818 MyIm_out1 = cktemp_out1.imag(); Im_out1 = 0.0;
10819 cktemp_out1 = complex<su2double>(0.0,0.0);
10821 MyRe_out2 = cktemp_out2.real(); Re_out2 = 0.0;
10822 MyIm_out2 = cktemp_out2.imag(); Im_out2 = 0.0;
10823 cktemp_out2 = complex<su2double>(0.0,0.0);
10833 cktemp_inf = complex<su2double>(Re_inf,Im_inf);
10834 cktemp_out1 = complex<su2double>(Re_out1,Im_out1);
10835 cktemp_out2 = complex<su2double>(Re_out2,Im_out2);
10839 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++){
10844 if (marker_flag ==
INFLOW){
10845 CkInflow[iMarker][iSpan][k]= cktemp_inf;
10857 delete [] turboVelocity;
10858 delete [] turboNormal;
10859 delete [] Velocity_i;
10860 delete [] deltaprim;
10867 unsigned short iDim, iVar, jVar, iSpan;
10868 unsigned long iPoint, Point_Normal, oldVertex, k, kend, kend_max;
10870 su2double *UnitNormal, *turboVelocity, *turboNormal;
10872 su2double *Velocity_b, Velocity2_b, Enthalpy_b, Energy_b, Density_b, Pressure_b, Temperature_b;
10873 su2double *Velocity_i, Velocity2_i, Energy_i, StaticEnergy_i, Density_i, Pressure_i;
10875 su2double *V_boundary, *V_domain, *S_boundary, *S_domain;
10876 unsigned short iZone = config->
GetiZone();
10885 su2double TwoPiThetaFreq_Pitch, pitch,theta;
10887 su2double spanPercent, extrarelfacAvg = 0.0, deltaSpan = 0.0, relfacAvg, relfacFou, coeffrelfacAvg = 0.0;
10888 unsigned short Turbo_Flag;
10898 su2double AverageSoundSpeed, *AverageTurboMach, AverageEntropy, AverageEnthalpy;
10902 su2double AvgMach , *cj, GilesBeta, *delta_c, **R_Matrix, *deltaprim, **R_c_inv,**R_c, alphaIn_BC, gammaIn_BC = 0,
10903 P_Total, T_Total, *FlowDir, Enthalpy_BC, Entropy_BC, *R, *c_avg,*dcjs, Beta_inf2, c2js_Re, c3js_Re, cOutjs_Re, avgVel2 =0.0;
10917 for (iVar = 0; iVar <
nVar; iVar++)
10923 for (iVar = 0; iVar <
nVar-1; iVar++)
10930 complex<su2double> I, c2ks, c2js, c3ks, c3js, c4ks, c4js, cOutks, cOutjs, Beta_inf;
10931 I = complex<su2double>(0.0,1.0);
10940 coeffrelfacAvg = (relfacAvgCfg - extrarelfacAvg)/deltaSpan;
10946 if(SpanWiseValues[iSpan] <= SpanWiseValues[0] + deltaSpan){
10947 relfacAvg = extrarelfacAvg + coeffrelfacAvg*(SpanWiseValues[iSpan] - SpanWiseValues[0]);
10950 else if(SpanWiseValues[iSpan] >= SpanWiseValues[
nSpanWiseSections -1] - deltaSpan){
10951 relfacAvg = extrarelfacAvg - coeffrelfacAvg*(SpanWiseValues[iSpan] - SpanWiseValues[
nSpanWiseSections -1]);
10955 relfacAvg = relfacAvgCfg;
10956 relfacFou = relfacFouCfg;
10961 relfacAvg = relfacAvgCfg;
10962 relfacFou = relfacFouCfg;
10975 AvgMach = AverageTurboMach[0]*AverageTurboMach[0] + AverageTurboMach[1]*AverageTurboMach[1];
10989 alphaIn_BC = atan(FlowDir[1]/FlowDir[0]);
10993 gammaIn_BC = FlowDir[2];
11016 R[0] = -(AverageEntropy - Entropy_BC);
11018 R[2] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC);
11022 R[0] = -(AverageEntropy - Entropy_BC);
11025 R[3] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC);
11029 for (iVar = 0; iVar <
nVar-1; iVar++){
11031 for (jVar = 0; jVar <
nVar-1; jVar++){
11032 c_avg[iVar] += R_c_inv[iVar][jVar]*R[jVar];
11043 alphaIn_BC = atan(FlowDir[1]/FlowDir[0]);
11048 gammaIn_BC = FlowDir[2];
11072 R[0] = -(AverageEntropy - Entropy_BC);
11074 R[2] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC);
11078 R[0] = -(AverageEntropy - Entropy_BC);
11081 R[3] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC);
11085 for (iVar = 0; iVar <
nVar-1; iVar++){
11087 for (jVar = 0; jVar <
nVar-1; jVar++){
11088 c_avg[iVar] += R_c_inv[iVar][jVar]*R[jVar];
11177 for (iVertex = 0; iVertex < geometry->
nVertexSpan[val_marker][iSpan]; iVertex++) {
11189 for (iDim = 0; iDim <
nDim; iDim++) Normal[iDim] = -Normal[iDim];
11208 for (iDim = 0; iDim <
nDim; iDim++)
11211 Velocity2_i += Velocity_i[iDim]*Velocity_i[iDim];
11218 StaticEnergy_i = Energy_i - 0.5*Velocity2_i;
11255 if (AvgMach <= 1.0){
11256 Beta_inf= I*complex<su2double>(sqrt(1.0 - AvgMach));
11257 c2js = complex<su2double>(0.0,0.0);
11258 c3js = complex<su2double>(0.0,0.0);
11259 for(k=0; k < 2*kend_max+1; k++){
11260 freq = k - kend_max;
11261 if(freq >= (
long)(-kend) && freq <= (
long)(kend) && AverageTurboMach[0] > config->
GetAverageMachLimit()){
11262 TwoPiThetaFreq_Pitch = 2*
PI_NUMBER*freq*theta/pitch;
11264 c2ks = -
CkInflow[val_marker][iSpan][k]*complex<su2double>(Beta_inf + AverageTurboMach[1])/complex<su2double>( 1.0 + AverageTurboMach[0]);
11265 c3ks =
CkInflow[val_marker][iSpan][k]*complex<su2double>(Beta_inf + AverageTurboMach[1])/complex<su2double>( 1.0 + AverageTurboMach[0]);
11266 c3ks *= complex<su2double>(Beta_inf + AverageTurboMach[1])/complex<su2double>( 1.0 + AverageTurboMach[0]);
11267 c2js += c2ks*(complex<su2double>(cos(TwoPiThetaFreq_Pitch))+I*complex<su2double>(sin(TwoPiThetaFreq_Pitch)));
11268 c3js += c3ks*(complex<su2double>(cos(TwoPiThetaFreq_Pitch))+I*complex<su2double>(sin(TwoPiThetaFreq_Pitch)));
11271 c2js += complex<su2double>(0.0,0.0);
11272 c3js += complex<su2double>(0.0,0.0);
11275 c2js_Re = c2js.real();
11276 c3js_Re = c3js.real();
11279 dcjs[0] = 0.0 - cj[0];
11280 dcjs[1] = c2js_Re - cj[1];
11281 dcjs[2] = c3js_Re - cj[2];
11283 dcjs[0] = 0.0 - cj[0];
11284 dcjs[1] = c2js_Re - cj[1];
11285 dcjs[2] = 0.0 - cj[2];
11286 dcjs[3] = c3js_Re - cj[3];
11291 Beta_inf2= -sqrt(AvgMach - 1.0);
11293 Beta_inf2= sqrt(AvgMach-1.0);
11296 c2js_Re = -cj[3]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]);
11297 c3js_Re = cj[3]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]);
11298 c3js_Re *= (Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]);
11300 c2js_Re = -cj[4]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]);
11301 c3js_Re = cj[4]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]);
11302 c3js_Re *= (Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]);
11307 dcjs[0] = 0.0 - cj[0];
11308 dcjs[1] = c2js_Re - cj[1];
11309 dcjs[2] = c3js_Re - cj[2];
11311 dcjs[0] = 0.0 - cj[0];
11312 dcjs[1] = c2js_Re - cj[1];
11313 dcjs[2] = 0.0 - cj[2];
11314 dcjs[3] = c3js_Re - cj[3];
11331 delta_c[0] = relfacAvg*c_avg[0] + relfacFou*dcjs[0];
11332 delta_c[1] = relfacAvg*c_avg[1] + relfacFou*dcjs[1];
11333 delta_c[2] = relfacAvg*c_avg[2] + relfacFou*dcjs[2];
11335 delta_c[3] = cj[3];
11337 delta_c[3] = relfacAvg*c_avg[3] + relfacFou*dcjs[3];
11338 delta_c[4] = cj[4];
11347 if (AvgMach > 1.0){
11350 GilesBeta= -sqrt(AvgMach - 1.0);
11353 GilesBeta= sqrt(AvgMach - 1.0);
11356 cOutjs_Re= (2.0 * AverageTurboMach[0])/(GilesBeta - AverageTurboMach[1])*cj[1] - (GilesBeta + AverageTurboMach[1])/(GilesBeta - AverageTurboMach[1])*cj[2];
11359 cOutjs_Re= (2.0 * AverageTurboMach[0])/(GilesBeta - AverageTurboMach[1])*cj[1] - (GilesBeta + AverageTurboMach[1])/(GilesBeta - AverageTurboMach[1])*cj[3];
11362 dcjs[3] = cOutjs_Re - cj[3];
11365 dcjs[4] = cOutjs_Re - cj[4];
11370 Beta_inf= I*complex<su2double>(sqrt(1.0 - AvgMach));
11371 cOutjs = complex<su2double>(0.0,0.0);
11372 for(k=0; k < 2*kend_max+1; k++){
11373 freq = k - kend_max;
11374 if(freq >= (
long)(-kend) && freq <= (
long)(kend) && AverageTurboMach[0] > config->
GetAverageMachLimit()){
11375 TwoPiThetaFreq_Pitch = 2*
PI_NUMBER*freq*theta/pitch;
11376 cOutks = complex<su2double>(2.0 * AverageTurboMach[0])/complex<su2double>(Beta_inf - AverageTurboMach[1])*
CkOutflow1[val_marker][iSpan][k];
11377 cOutks -= complex<su2double>(Beta_inf + AverageTurboMach[1])/complex<su2double>(Beta_inf - AverageTurboMach[1])*
CkOutflow2[val_marker][iSpan][k];
11379 cOutjs += cOutks*(complex<su2double>(cos(TwoPiThetaFreq_Pitch)) + I*complex<su2double>(sin(TwoPiThetaFreq_Pitch)));
11382 cOutjs +=complex<su2double>(0.0,0.0);
11385 cOutjs_Re = cOutjs.real();
11388 dcjs[3] = cOutjs_Re - cj[3];
11391 dcjs[4] = cOutjs_Re - cj[4];
11404 delta_c[0] = cj[0];
11405 delta_c[1] = cj[1];
11406 delta_c[2] = cj[2];
11408 delta_c[3] = relfacAvg*c_avg[3] + relfacFou*dcjs[3];
11411 delta_c[3] = cj[3];
11412 delta_c[4] = relfacAvg*c_avg[4] + relfacFou*dcjs[4];
11417 if (abs(AverageTurboMach[0]) > 1.0000){
11422 if (
nDim == 3)delta_c[4] = 0.0;
11433 for (iVar = 0; iVar <
nVar; iVar++)
11435 deltaprim[iVar]=0.0;
11436 for (jVar = 0; jVar <
nVar; jVar++)
11438 deltaprim[iVar] += R_Matrix[iVar][jVar]*delta_c[jVar];
11457 for (iDim = 0; iDim <
nDim; iDim++) {
11458 Velocity2_b+= Velocity_b[iDim]*Velocity_b[iDim];
11461 if(Pressure_b <= 0.0 || Density_b <= 0.0 ){
11462 Pressure_b = Pressure_i;
11463 Density_b = Density_i;
11465 for (iDim = 0; iDim <
nDim; iDim++) {
11466 Velocity_b[iDim] = Velocity_i[iDim];
11467 Velocity2_b+= Velocity_b[iDim]*Velocity_b[iDim];
11474 Enthalpy_b = Energy_b + Pressure_b/Density_b;
11477 V_boundary[0] = Temperature_b;
11478 for (iDim = 0; iDim <
nDim; iDim++)
11479 V_boundary[iDim+1] = Velocity_b[iDim];
11480 V_boundary[
nDim+1] = Pressure_b;
11481 V_boundary[
nDim+2] = Density_b;
11482 V_boundary[
nDim+3] = Enthalpy_b;
11580 delete [] Velocity_b;
11581 delete [] Velocity_i;
11583 delete [] S_boundary;
11585 delete [] deltaprim;
11587 for (iVar = 0; iVar <
nVar; iVar++)
11589 delete [] R_Matrix[iVar];
11591 for (iVar = 0; iVar <
nVar-1; iVar++)
11593 delete [] R_c_inv[iVar];
11594 delete [] R_c[iVar];
11596 delete [] R_Matrix;
11603 delete [] AverageTurboMach;
11604 delete [] UnitNormal;
11605 delete [] turboNormal;
11606 delete [] turboVelocity;
11611 unsigned short iDim;
11612 unsigned long iVertex, iPoint;
11613 su2double P_Total, T_Total, Velocity[3], Velocity2, H_Total, Temperature, Riemann,
11614 Pressure, Density, Energy, *Flow_Dir, Mach2, SoundSpeed2, SoundSpeed_Total2, Vel_Mag,
11615 alpha, aa, bb, cc, dd, Area, UnitNormal[3];
11630 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
11645 for (iDim = 0; iDim <
nDim; iDim++) Normal[iDim] = -Normal[iDim];
11649 for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim];
11650 Area = sqrt (Area);
11652 for (iDim = 0; iDim <
nDim; iDim++)
11653 UnitNormal[iDim] = Normal[iDim]/Area;
11669 switch (Kind_Inlet) {
11688 Density = V_domain[
nDim+2];
11690 for (iDim = 0; iDim <
nDim; iDim++) {
11691 Velocity[iDim] = V_domain[iDim+1];
11692 Velocity2 += Velocity[iDim]*Velocity[iDim];
11694 Energy = V_domain[
nDim+3] - V_domain[
nDim+1]/V_domain[
nDim+2];
11695 Pressure = V_domain[
nDim+1];
11697 SoundSpeed2 =
Gamma*Pressure/Density;
11703 for (iDim = 0; iDim <
nDim; iDim++)
11704 Riemann += Velocity[iDim]*UnitNormal[iDim];
11708 SoundSpeed_Total2 =
Gamma_Minus_One*(H_Total - (Energy + Pressure/Density)+0.5*Velocity2) + SoundSpeed2;
11714 for (iDim = 0; iDim <
nDim; iDim++)
11715 alpha += UnitNormal[iDim]*Flow_Dir[iDim];
11727 dd = bb*bb - 4.0*aa*cc;
11728 dd = sqrt(max(0.0, dd));
11729 Vel_Mag = (-bb + dd)/(2.0*aa);
11730 Vel_Mag = max(0.0, Vel_Mag);
11731 Velocity2 = Vel_Mag*Vel_Mag;
11739 Mach2 = Velocity2/SoundSpeed2;
11740 Mach2 = min(1.0, Mach2);
11741 Velocity2 = Mach2*SoundSpeed2;
11742 Vel_Mag = sqrt(Velocity2);
11747 for (iDim = 0; iDim <
nDim; iDim++)
11748 Velocity[iDim] = Vel_Mag*Flow_Dir[iDim];
11752 Temperature = SoundSpeed2/(
Gamma*Gas_Constant);
11760 Density = Pressure/(Gas_Constant*Temperature);
11769 V_inlet[0] = Temperature;
11770 for (iDim = 0; iDim <
nDim; iDim++)
11771 V_inlet[iDim+1] = Velocity[iDim];
11772 V_inlet[
nDim+1] = Pressure;
11773 V_inlet[
nDim+2] = Density;
11774 V_inlet[
nDim+3] = Energy + Pressure/Density;
11795 for (iDim = 0; iDim <
nDim; iDim++)
11796 Velocity[iDim] =
node[iPoint]->GetVelocity(iDim);
11798 SoundSpeed2 =
Gamma*Pressure/V_domain[
nDim+2];
11803 Riemann = Two_Gamma_M1*sqrt(SoundSpeed2);
11804 for (iDim = 0; iDim <
nDim; iDim++)
11805 Riemann += Velocity[iDim]*UnitNormal[iDim];
11809 SoundSpeed2 = Riemann;
11810 for (iDim = 0; iDim <
nDim; iDim++)
11811 SoundSpeed2 -= Vel_Mag*Flow_Dir[iDim]*UnitNormal[iDim];
11814 SoundSpeed2 = SoundSpeed2*SoundSpeed2;
11818 Pressure = SoundSpeed2*Density/
Gamma;
11827 V_inlet[0] = Pressure / ( Gas_Constant * Density);
11828 for (iDim = 0; iDim <
nDim; iDim++)
11829 V_inlet[iDim+1] = Vel_Mag*Flow_Dir[iDim];
11830 V_inlet[
nDim+1] = Pressure;
11831 V_inlet[
nDim+2] = Density;
11832 V_inlet[
nDim+3] = Energy + Pressure/Density;
11913 unsigned short iVar, iDim;
11914 unsigned long iVertex, iPoint;
11915 su2double Pressure, P_Exit, Velocity[3],
11916 Velocity2, Entropy, Density, Energy, Riemann, Vn, SoundSpeed, Mach_Exit, Vn_Exit,
11917 Area, UnitNormal[3];
11930 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
11942 for (iDim = 0; iDim <
nDim; iDim++) Normal[iDim] = -Normal[iDim];
11946 for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim];
11947 Area = sqrt (Area);
11949 for (iDim = 0; iDim <
nDim; iDim++)
11950 UnitNormal[iDim] = Normal[iDim]/Area;
11966 Density = V_domain[
nDim+2];
11967 Velocity2 = 0.0; Vn = 0.0;
11968 for (iDim = 0; iDim <
nDim; iDim++) {
11969 Velocity[iDim] = V_domain[iDim+1];
11970 Velocity2 += Velocity[iDim]*Velocity[iDim];
11971 Vn += Velocity[iDim]*UnitNormal[iDim];
11973 Pressure = V_domain[
nDim+1];
11974 SoundSpeed = sqrt(
Gamma*Pressure/Density);
11975 Mach_Exit = sqrt(Velocity2)/SoundSpeed;
11977 if (Mach_Exit >= 1.0) {
11982 for (iVar = 0; iVar <
nPrimVar; iVar++) V_outlet[iVar] = V_domain[iVar];
11995 Entropy = Pressure*pow(1.0/Density,
Gamma);
11999 Density = pow(P_Exit/Entropy,1.0/
Gamma);
12001 SoundSpeed = sqrt(
Gamma*P_Exit/Density);
12004 for (iDim = 0; iDim <
nDim; iDim++) {
12005 Velocity[iDim] = Velocity[iDim] + (Vn_Exit-Vn)*UnitNormal[iDim];
12006 Velocity2 += Velocity[iDim]*Velocity[iDim];
12012 V_outlet[0] = Pressure / ( Gas_Constant * Density);
12013 for (iDim = 0; iDim <
nDim; iDim++)
12014 V_outlet[iDim+1] = Velocity[iDim];
12015 V_outlet[
nDim+1] = Pressure;
12016 V_outlet[
nDim+2] = Density;
12017 V_outlet[
nDim+3] = Energy + Pressure/Density;
12091 unsigned short iDim;
12092 unsigned long iVertex, iPoint;
12095 su2double Density, Pressure, Temperature, Energy, *Vel, Velocity2;
12118 for (iDim = 0; iDim <
nDim; iDim++)
12123 Density = Pressure/(Gas_Constant*Temperature);
12128 for (iDim = 0; iDim <
nDim; iDim++)
12129 Velocity2 += Velocity[iDim]*Velocity[iDim];
12135 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
12143 V_inlet[0] = Temperature;
12144 for (iDim = 0; iDim <
nDim; iDim++)
12145 V_inlet[iDim+1] = Velocity[iDim];
12146 V_inlet[
nDim+1] = Pressure;
12147 V_inlet[
nDim+2] = Density;
12148 V_inlet[
nDim+3] = Energy + Pressure/Density;
12163 for (iDim = 0; iDim <
nDim; iDim++) Normal[iDim] = -Normal[iDim];
12229 delete [] Velocity;
12235 unsigned short iDim;
12236 unsigned long iVertex, iPoint;
12250 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
12268 V_outlet[0] = V_domain[0];
12269 for (iDim = 0; iDim <
nDim; iDim++)
12270 V_outlet[iDim+1] = V_domain[iDim+1];
12271 V_outlet[
nDim+1] = V_domain[
nDim+1];
12272 V_outlet[
nDim+2] = V_domain[
nDim+2];
12273 V_outlet[
nDim+3] = V_domain[
nDim+3];
12282 for (iDim = 0; iDim <
nDim; iDim++) Normal[iDim] = -Normal[iDim];
12353 unsigned short iDim;
12354 unsigned long iVertex, iPoint;
12355 su2double Pressure,
Inflow_Pressure = 0.0, Velocity[3], Velocity2, Entropy, Target_Inflow_MassFlow = 0.0, Target_Inflow_Mach = 0.0, Density, Energy,
12356 Riemann, Area, UnitNormal[3], Vn, SoundSpeed, Vn_Exit, Inflow_Pressure_inc, Inflow_Pressure_old, Inflow_Mach_old, Inflow_MassFlow_old;
12387 Inflow_Pressure_inc = - (1.0 - (Inflow_Mach_old/Target_Inflow_Mach)) * Baseline_Press;
12391 Inflow_Pressure = (1.0 - DampingFactor)*Inflow_Pressure_old + DampingFactor * (Inflow_Pressure_old + Inflow_Pressure_inc);
12403 if (Engine_HalfModel) Target_Inflow_MassFlow /= 2.0;
12412 Inflow_Pressure_inc = - (1.0 - (Inflow_MassFlow_old/Target_Inflow_MassFlow)) * Baseline_Press;
12416 Inflow_Pressure = (1.0 - DampingFactor)*Inflow_Pressure_old + DampingFactor * (Inflow_Pressure_old + Inflow_Pressure_inc);
12433 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
12448 for (iDim = 0; iDim <
nDim; iDim++) Normal[iDim] = -Normal[iDim];
12451 for (iDim = 0; iDim <
nDim; iDim++)
12452 Area += Normal[iDim]*Normal[iDim];
12453 Area = sqrt (Area);
12455 for (iDim = 0; iDim <
nDim; iDim++)
12456 UnitNormal[iDim] = Normal[iDim]/Area;
12470 Density = V_domain[
nDim+2];
12471 Velocity2 = 0.0; Vn = 0.0;
12472 for (iDim = 0; iDim <
nDim; iDim++) {
12473 Velocity[iDim] = V_domain[iDim+1];
12474 Velocity2 += Velocity[iDim]*Velocity[iDim];
12475 Vn += Velocity[iDim]*UnitNormal[iDim];
12477 Pressure = V_domain[
nDim+1];
12478 SoundSpeed = sqrt(
Gamma*Pressure/Density);
12479 Entropy = Pressure*pow(1.0/Density,
Gamma);
12489 for (iDim = 0; iDim <
nDim; iDim++) {
12490 Velocity[iDim] = Velocity[iDim] + (Vn_Exit-Vn)*UnitNormal[iDim];
12491 Velocity2 += Velocity[iDim]*Velocity[iDim];
12499 V_inflow[0] = Pressure / ( Gas_Constant * Density);
12500 for (iDim = 0; iDim <
nDim; iDim++)
12501 V_inflow[iDim+1] = Velocity[iDim];
12502 V_inflow[
nDim+1] = Pressure;
12503 V_inflow[
nDim+2] = Density;
12504 V_inflow[
nDim+3] = Energy + Pressure/Density;
12505 V_inflow[
nDim+4] = SoundSpeed;
12577 unsigned short iDim;
12578 unsigned long iVertex, iPoint;
12579 su2double Exhaust_Pressure,
Exhaust_Temperature, Velocity[3], Velocity2, H_Exhaust, Temperature, Riemann, Area, UnitNormal[3], Pressure, Density, Energy, Mach2, SoundSpeed2, SoundSpeed_Exhaust2, Vel_Mag, alpha, aa, bb, cc, dd, Flow_Dir[3];
12580 su2double *V_exhaust, *V_domain, Target_Exhaust_Pressure, Exhaust_Pressure_old, Exhaust_Pressure_inc;
12603 Exhaust_Pressure_inc = (1.0 - (Exhaust_Pressure_old/Target_Exhaust_Pressure)) * Baseline_Press;
12607 Exhaust_Pressure = (1.0 - DampingFactor) * Exhaust_Pressure_old + DampingFactor * (Exhaust_Pressure_old + Exhaust_Pressure_inc);
12621 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
12636 for (iDim = 0; iDim <
nDim; iDim++) Normal[iDim] = -Normal[iDim];
12639 for (iDim = 0; iDim <
nDim; iDim++)
12640 Area += Normal[iDim]*Normal[iDim];
12641 Area = sqrt (Area);
12643 for (iDim = 0; iDim <
nDim; iDim++)
12644 UnitNormal[iDim] = Normal[iDim]/Area;
12656 Density = V_domain[
nDim+2];
12658 for (iDim = 0; iDim <
nDim; iDim++) {
12659 Velocity[iDim] = V_domain[iDim+1];
12660 Velocity2 += Velocity[iDim]*Velocity[iDim];
12662 Energy = V_domain[
nDim+3] - V_domain[
nDim+1]/V_domain[
nDim+2];
12663 Pressure = V_domain[
nDim+1];
12665 SoundSpeed2 =
Gamma*Pressure/Density;
12671 for (iDim = 0; iDim <
nDim; iDim++)
12672 Riemann += Velocity[iDim]*UnitNormal[iDim];
12676 SoundSpeed_Exhaust2 =
Gamma_Minus_One*(H_Exhaust - (Energy + Pressure/Density)+0.5*Velocity2) + SoundSpeed2;
12680 for (iDim = 0; iDim <
nDim; iDim++)
12681 Flow_Dir[iDim] = -UnitNormal[iDim];
12687 for (iDim = 0; iDim <
nDim; iDim++)
12688 alpha += UnitNormal[iDim]*Flow_Dir[iDim];
12699 dd = bb*bb - 4.0*aa*cc;
12700 dd = sqrt(max(0.0, dd));
12701 Vel_Mag = (-bb + dd)/(2.0*aa);
12703 if (Vel_Mag >= 0.0) {
12705 Velocity2 = Vel_Mag*Vel_Mag;
12710 Mach2 = Velocity2/SoundSpeed2;
12711 Velocity2 = Mach2*SoundSpeed2;
12712 Vel_Mag = sqrt(Velocity2);
12717 for (iDim = 0; iDim <
nDim; iDim++)
12718 Velocity[iDim] = Vel_Mag*Flow_Dir[iDim];
12722 Temperature = SoundSpeed2/(
Gamma*Gas_Constant);
12730 Density = Pressure/(Gas_Constant*Temperature);
12739 V_exhaust[0] = Temperature;
12740 for (iDim = 0; iDim <
nDim; iDim++)
12741 V_exhaust[iDim+1] = Velocity[iDim];
12742 V_exhaust[
nDim+1] = Pressure;
12743 V_exhaust[
nDim+2] = Density;
12744 V_exhaust[
nDim+3] = Energy + Pressure/Density;
12745 V_exhaust[
nDim+4] = sqrt(SoundSpeed2);
12752 V_exhaust[0] = V_domain[0];
12753 for (iDim = 0; iDim <
nDim; iDim++)
12754 V_exhaust[iDim+1] = V_domain[iDim+1];
12755 V_exhaust[
nDim+1] = V_domain[
nDim+1];
12756 V_exhaust[
nDim+2] = V_domain[
nDim+2];
12757 V_exhaust[
nDim+3] = V_domain[
nDim+3];
12758 V_exhaust[
nDim+4] = V_domain[
nDim+4];
12830 CConfig *config,
unsigned short val_marker) {
12834 BC_Euler_Wall(geometry, solver_container, conv_numerics, config, val_marker);
12841 unsigned long iVertex, jVertex, iPoint, Point_Normal = 0;
12842 unsigned short iDim, iVar, iMarker, nDonorVertex;
12856 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
12860 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
12869 for (iVar = 0; iVar <
nVar; iVar++)
12874 for (jVertex = 0; jVertex < nDonorVertex; jVertex++){
12878 for (iVar = 0; iVar <
nPrimVar; iVar++) {
12907 for (iDim = 0; iDim <
nDim; iDim++)
12908 Normal[iDim] = -Normal[iDim];
12921 for (iVar = 0; iVar <
nVar; iVar++)
12922 Residual[iVar] += weight*tmp_residual[iVar];
12936 for (iVar = 0; iVar <
nVar; iVar++)
12941 for (jVertex = 0; jVertex < nDonorVertex; jVertex++){
12974 for (iVar = 0; iVar <
nVar; iVar++)
12975 Residual[iVar] += weight*tmp_residual[iVar];
12993 delete [] tmp_residual;
13000 CConfig *config,
unsigned short val_marker) {
13002 unsigned long iVertex, iPoint, GlobalIndex_iPoint, GlobalIndex_jPoint;
13003 unsigned short iDim, iVar;
13014 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
13020 if ((geometry->
node[iPoint]->
GetDomain()) && (GlobalIndex_iPoint != GlobalIndex_jPoint)) {
13024 for (iVar = 0; iVar <
nPrimVar; iVar++) {
13036 for (iDim = 0; iDim <
nDim; iDim++) Normal[iDim] = -Normal[iDim];
13061 CConfig *config,
unsigned short val_marker) {
13063 unsigned long iVertex, iPoint, GlobalIndex_iPoint, GlobalIndex_jPoint;
13064 unsigned short iDim, iVar;
13075 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
13081 if ((geometry->
node[iPoint]->
GetDomain()) && (GlobalIndex_iPoint != GlobalIndex_jPoint)) {
13085 for (iVar = 0; iVar <
nPrimVar; iVar++) {
13097 for (iDim = 0; iDim <
nDim; iDim++) Normal[iDim] = -Normal[iDim];
13122 CConfig *config,
unsigned short val_marker) {
13124 BC_ActDisk(geometry, solver_container, conv_numerics, visc_numerics, config, val_marker,
true);
13129 CConfig *config,
unsigned short val_marker) {
13131 BC_ActDisk(geometry, solver_container, conv_numerics, visc_numerics, config, val_marker,
false);
13136 CConfig *config,
unsigned short val_marker,
bool val_inlet_surface) {
13138 unsigned short iDim;
13139 unsigned long iVertex, iPoint, GlobalIndex_donor, GlobalIndex;
13140 su2double Pressure, Velocity[3], Target_Press_Jump, Target_Temp_Jump,
13141 Velocity2, Entropy, Density, Energy, Riemann, Vn, SoundSpeed, Vn_Inlet, Mach_Outlet,
13142 Area, UnitNormal[3], *V_outlet, *V_domain, *V_inlet, P_Total, T_Total, H_Total, Temperature,
13143 Mach2, SoundSpeed2, SoundSpeed_Total2, Vel_Mag, alpha, aa, bb, cc, dd;
13144 su2double Factor, P_static, T_static, SoS_outlet, Rho_outlet, Rho_inlet;
13145 su2double Vel_normal_inlet[3], Vel_tangent_inlet[3], Vel_inlet[3];
13146 su2double Vel_normal_outlet[3], Vel_tangent_outlet[3], Vel_outlet[3];
13147 su2double Vel_normal_inlet_, Vel_tangent_inlet_, Vel_inlet_;
13148 su2double Vel_normal_outlet_, Vel_outlet_;
13150 su2double Pressure_out, Density_out, SoundSpeed_out, Velocity2_out,
13151 Mach_out, Pressure_in, Density_in, SoundSpeed_in, Velocity2_in,
13152 Mach_in, PressureAdj, TemperatureAdj;
13167 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
13176 (GlobalIndex != GlobalIndex_donor)) {
13181 for (iDim = 0; iDim <
nDim; iDim++) Normal[iDim] = -Normal[iDim];
13185 for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim];
13186 Area = sqrt (Area);
13188 for (iDim = 0; iDim <
nDim; iDim++)
13189 UnitNormal[iDim] = Normal[iDim]/Area;
13197 if (val_inlet_surface) {
13201 Pressure_out = V_outlet[
nDim+1];
13202 Density_out = V_outlet[
nDim+2];
13203 SoundSpeed_out = sqrt(
Gamma*Pressure_out/Density_out);
13205 Pressure_in = V_inlet[
nDim+1];
13206 Density_in = V_inlet[
nDim+2];
13207 SoundSpeed_in = sqrt(
Gamma*Pressure_in/Density_in);
13209 Velocity2_out = 0.0; Velocity2_in = 0.0;
13210 for (iDim = 0; iDim <
nDim; iDim++) {
13211 Velocity2_out += V_outlet[iDim+1]*V_outlet[iDim+1];
13212 Velocity2_in += V_inlet[iDim+1]*V_inlet[iDim+1];
13215 PressureAdj = 1.0; TemperatureAdj = 1.0;
13216 if ((Velocity2_out > 0.0) && (Velocity2_in > 0.0)) {
13218 Mach_out = sqrt(Velocity2_out)/SoundSpeed_out;
13219 Mach_in = sqrt(Velocity2_in)/SoundSpeed_in;
13221 PressureAdj = pow( 1.0 + Mach_out * Mach_out * 0.5 * (
Gamma - 1.0),
Gamma / (
Gamma - 1.0)) /
13222 pow( 1.0 + Mach_in * Mach_in * 0.5 * (
Gamma - 1.0),
Gamma / (
Gamma - 1.0));
13223 TemperatureAdj = (1.0 + Mach_out * Mach_out * 0.5 * (
Gamma - 1.0)) /
13224 (1.0 + Mach_in * Mach_in * 0.5 * (
Gamma - 1.0));
13229 P_static = V_outlet[
nDim+1] / (Target_Press_Jump/PressureAdj);
13230 T_static = V_outlet[0] / (Target_Temp_Jump/TemperatureAdj);
13232 else { P_static = V_outlet[
nDim+1] - Target_Press_Jump; T_static = V_outlet[0] - Target_Temp_Jump; }
13238 Pressure_out = V_outlet[
nDim+1];
13239 Density_out = V_outlet[
nDim+2];
13240 SoundSpeed_out = sqrt(
Gamma*Pressure_out/Density_out);
13242 Pressure_in = V_inlet[
nDim+1];
13243 Density_in = V_inlet[
nDim+2];
13244 SoundSpeed_in = sqrt(
Gamma*Pressure_in/Density_in);
13246 Velocity2_out = 0.0; Velocity2_in = 0.0;
13247 for (iDim = 0; iDim <
nDim; iDim++) {
13248 Velocity2_out += V_outlet[iDim+1]*V_outlet[iDim+1];
13249 Velocity2_in += V_inlet[iDim+1]*V_inlet[iDim+1];
13252 PressureAdj = 1.0; TemperatureAdj = 1.0;
13253 if ((Velocity2_out > 0.0) && (Velocity2_in > 0.0)) {
13255 Mach_out = sqrt(Velocity2_out)/SoundSpeed_out;
13256 Mach_in = sqrt(Velocity2_in)/SoundSpeed_in;
13258 PressureAdj = pow( 1.0 + Mach_out * Mach_out * 0.5 * (
Gamma - 1.0),
Gamma / (
Gamma - 1.0)) /
13259 pow( 1.0 + Mach_in * Mach_in * 0.5 * (
Gamma - 1.0),
Gamma / (
Gamma - 1.0));
13260 TemperatureAdj = (1.0 + Mach_out * Mach_out * 0.5 * (
Gamma - 1.0)) /
13261 (1.0 + Mach_in * Mach_in * 0.5 * (
Gamma - 1.0));
13265 P_static = V_inlet[
nDim+1] * (Target_Press_Jump/PressureAdj);
13266 T_static = V_inlet[0] * (Target_Temp_Jump/TemperatureAdj);
13268 else { P_static = V_inlet[
nDim+1] + Target_Press_Jump; T_static = V_inlet[0] + Target_Temp_Jump; }
13273 if (val_inlet_surface) {
13278 Density = V_domain[
nDim+2];
13279 Velocity2 = 0.0; Vn = 0.0;
13280 for (iDim = 0; iDim <
nDim; iDim++) {
13281 Velocity[iDim] = V_domain[iDim+1];
13282 Velocity2 += Velocity[iDim]*Velocity[iDim];
13283 Vn += Velocity[iDim]*UnitNormal[iDim];
13285 Pressure = V_domain[
nDim+1];
13286 SoundSpeed = sqrt(
Gamma*Pressure/Density);
13288 Entropy = Pressure*pow(1.0/Density,
Gamma);
13293 Pressure = P_static;
13294 Density = pow(Pressure/Entropy,1.0/
Gamma);
13295 SoundSpeed = sqrt(
Gamma*Pressure/Density);
13299 for (iDim = 0; iDim <
nDim; iDim++) {
13300 Velocity[iDim] = Velocity[iDim] + (Vn_Inlet-Vn)*UnitNormal[iDim];
13301 Velocity2 += Velocity[iDim]*Velocity[iDim];
13308 V_inlet[0] = Pressure / ( Gas_Constant * Density);
13309 for (iDim = 0; iDim <
nDim; iDim++)
13310 V_inlet[iDim+1] = Velocity[iDim];
13311 V_inlet[
nDim+1] = Pressure;
13312 V_inlet[
nDim+2] = Density;
13313 V_inlet[
nDim+3] = Energy + Pressure/Density;
13314 V_inlet[
nDim+4] = SoundSpeed;
13330 Rho_inlet = V_inlet[
nDim+2];
13331 for (iDim = 0; iDim <
nDim; iDim++)
13332 Vel_inlet[iDim] = V_inlet[iDim+1];
13334 Vel_normal_inlet_ = 0.0; Vel_inlet_ = 0.0;
13335 for (iDim = 0; iDim <
nDim; iDim++) {
13336 Vel_normal_inlet[iDim] = -Vel_inlet[iDim]*UnitNormal[iDim];
13337 Vel_normal_inlet_ += Vel_normal_inlet[iDim]*Vel_normal_inlet[iDim];
13338 Vel_inlet_+= Vel_inlet[iDim]*Vel_inlet[iDim];
13340 Vel_inlet_ = sqrt(Vel_inlet_);
13341 Vel_normal_inlet_ = sqrt(Vel_normal_inlet_);
13343 Vel_tangent_inlet_ = 0.0;
13344 for (iDim = 0; iDim <
nDim; iDim++) {
13345 Vel_tangent_inlet[iDim] = Vel_inlet[iDim] - Vel_normal_inlet[iDim];
13346 Vel_tangent_inlet_ += Vel_tangent_inlet[iDim]*Vel_tangent_inlet[iDim];
13348 Vel_tangent_inlet_ = sqrt(Vel_tangent_inlet_);
13353 Vel_normal_outlet_ = (1.0-SecondaryFlow/100.0)*(Rho_inlet*Vel_normal_inlet_)/Rho_outlet;
13356 for (iDim = 0; iDim <
nDim; iDim++) {
13357 Vel_normal_outlet[iDim] = -Vel_normal_outlet_*UnitNormal[iDim];
13358 Vel_tangent_outlet[iDim] = Vel_tangent_inlet[iDim];
13359 Vel_outlet[iDim] = Vel_normal_outlet[iDim] + Vel_tangent_outlet[iDim];
13360 Vel_outlet_ += Vel_outlet[iDim]*Vel_outlet[iDim];
13362 Vel_outlet_ = sqrt(Vel_outlet_);
13364 Mach_Outlet = min(Vel_outlet_/SoS_outlet, 1.0);
13371 T_Total = T_static * Factor;
13375 if (Vel_outlet_ != 0.0) {
13376 for (iDim = 0; iDim <
nDim; iDim++) Flow_Dir[iDim] = Vel_outlet[iDim]/Vel_outlet_;
13379 for (iDim = 0; iDim <
nDim; iDim++) Flow_Dir[iDim] = 0.0;
13384 Density = V_domain[
nDim+2];
13386 for (iDim = 0; iDim <
nDim; iDim++) {
13387 Velocity[iDim] = V_domain[iDim+1];
13388 Velocity2 += Velocity[iDim]*Velocity[iDim];
13390 Energy = V_domain[
nDim+3] - V_domain[
nDim+1]/V_domain[
nDim+2];
13391 Pressure = V_domain[
nDim+1];
13393 SoundSpeed2 =
Gamma*Pressure/Density;
13399 for (iDim = 0; iDim <
nDim; iDim++)
13400 Riemann += Velocity[iDim]*UnitNormal[iDim];
13404 SoundSpeed_Total2 =
Gamma_Minus_One*(H_Total - (Energy + Pressure/Density)+0.5*Velocity2) + SoundSpeed2;
13410 for (iDim = 0; iDim <
nDim; iDim++)
13411 alpha += UnitNormal[iDim]*Flow_Dir[iDim];
13422 dd = bb*bb - 4.0*aa*cc;
13423 dd = sqrt(max(0.0, dd));
13424 Vel_Mag = (-bb + dd)/(2.0*aa);
13425 Vel_Mag = max(0.0, Vel_Mag);
13426 Velocity2 = Vel_Mag*Vel_Mag;
13434 Mach2 = min(1.0, Velocity2/SoundSpeed2);
13435 Velocity2 = Mach2*SoundSpeed2;
13436 Vel_Mag = sqrt(Velocity2);
13441 for (iDim = 0; iDim <
nDim; iDim++)
13442 Velocity[iDim] = Vel_Mag*Flow_Dir[iDim];
13446 Temperature = SoundSpeed2/(
Gamma*Gas_Constant);
13454 Density = Pressure/(Gas_Constant*Temperature);
13463 V_outlet[0] = Temperature;
13464 for (iDim = 0; iDim <
nDim; iDim++)
13465 V_outlet[iDim+1] = Velocity[iDim];
13466 V_outlet[
nDim+1] = Pressure;
13467 V_outlet[
nDim+2] = Density;
13468 V_outlet[
nDim+3] = Energy + Pressure/Density;
13469 V_outlet[
nDim+4] = sqrt(SoundSpeed2);
13545 delete [] Flow_Dir;
13550 CConfig *config,
unsigned short val_marker) { }
13555 unsigned short iRKStep,
unsigned short iMesh,
unsigned short RunTime_EqSystem) {
13559 unsigned short iVar, jVar, iMarker, iDim;
13560 unsigned long iPoint, jPoint, iEdge, iVertex;
13562 su2double *U_time_nM1, *U_time_n, *U_time_nP1;
13563 su2double Volume_nM1, Volume_nP1, TimeStep;
13564 su2double *Normal = NULL, *GridVel_i = NULL, *GridVel_j = NULL, Residual_GCL;
13575 if (!grid_movement) {
13597 for (iVar = 0; iVar <
nVar; iVar++) {
13599 Residual[iVar] = (U_time_nP1[iVar] - U_time_n[iVar])*Volume_nP1 / TimeStep;
13601 Residual[iVar] = ( 3.0*U_time_nP1[iVar] - 4.0*U_time_n[iVar]
13602 +1.0*U_time_nM1[iVar])*Volume_nP1 / (2.0*TimeStep);
13610 for (iVar = 0; iVar <
nVar; iVar++) {
13611 for (jVar = 0; jVar <
nVar; jVar++)
Jacobian_i[iVar][jVar] = 0.0;
13613 Jacobian_i[iVar][iVar] = Volume_nP1 / TimeStep;
13615 Jacobian_i[iVar][iVar] = (Volume_nP1*3.0)/(2.0*TimeStep);
13633 for (iEdge = 0; iEdge < geometry->
GetnEdge(); iEdge++) {
13649 Residual_GCL = 0.0;
13650 for (iDim = 0; iDim <
nDim; iDim++)
13651 Residual_GCL += 0.5*(GridVel_i[iDim]+GridVel_j[iDim])*Normal[iDim];
13656 for (iVar = 0; iVar <
nVar; iVar++)
13657 Residual[iVar] = U_time_n[iVar]*Residual_GCL;
13663 for (iVar = 0; iVar <
nVar; iVar++)
13664 Residual[iVar] = U_time_n[iVar]*Residual_GCL;
13671 for (iMarker = 0; iMarker < geometry->
GetnMarker(); iMarker++) {
13673 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
13687 Residual_GCL = 0.0;
13688 for (iDim = 0; iDim <
nDim; iDim++)
13689 Residual_GCL -= 0.5*(GridVel_i[iDim]+GridVel_i[iDim])*Normal[iDim];
13694 for (iVar = 0; iVar <
nVar; iVar++)
13695 Residual[iVar] = U_time_n[iVar]*Residual_GCL;
13725 for (iVar = 0; iVar <
nVar; iVar++) {
13727 Residual[iVar] = (U_time_nP1[iVar] - U_time_n[iVar])*(Volume_nP1/TimeStep);
13729 Residual[iVar] = (U_time_nP1[iVar] - U_time_n[iVar])*(3.0*Volume_nP1/(2.0*TimeStep))
13730 + (U_time_nM1[iVar] - U_time_n[iVar])*(Volume_nM1/(2.0*TimeStep));
13737 for (iVar = 0; iVar <
nVar; iVar++) {
13738 for (jVar = 0; jVar <
nVar; jVar++)
Jacobian_i[iVar][jVar] = 0.0;
13740 Jacobian_i[iVar][iVar] = Volume_nP1/TimeStep;
13742 Jacobian_i[iVar][iVar] = (3.0*Volume_nP1)/(2.0*TimeStep);
13753 unsigned short iVar;
13754 unsigned long iPoint;
13759 for (iVar = 0; iVar <
nVar; iVar++){
13766 for (iVar = 0; iVar <
nVar; iVar++){
13780 unsigned long iPoint;
13783 for (iPoint = 0; iPoint <
nPoint; iPoint++){
13794 unsigned short iDim, iVar, iMesh, iMeshFine;
13795 unsigned long iPoint, index, iChildren, Point_Fine;
13797 su2double Area_Children, Area_Parent, *Coord, *Solution_Fine;
13806 string UnstExt, text_line;
13807 ifstream restart_file;
13809 unsigned short iZone = config->
GetiZone();
13810 unsigned short nZone = config->
GetnZone();
13815 for (iDim = 0; iDim <
nDim; iDim++)
13819 long iPoint_Local = 0;
unsigned long iPoint_Global = 0;
13820 unsigned long iPoint_Global_Local = 0;
13821 unsigned short rbuf_NotMatching = 0, sbuf_NotMatching = 0;
13834 if (dual_time || time_stepping)
13855 if (iPoint_Local > -1) {
13863 iPoint_Global_Local++;
13868 if (grid_movement && val_update_geo) {
13873 if (turb_model ==
SA || turb_model ==
SA_NEG) {
13875 }
else if (turb_model ==
SST) {
13884 if (!steady_restart) {
13888 for (iDim = 0; iDim <
nDim; iDim++) { Coord[iDim] =
Restart_Data[index+iDim]; }
13892 for (iDim = 0; iDim <
nDim; iDim++) { GridVel[iDim] =
Restart_Data[index+iDim]; }
13895 for (iDim = 0; iDim <
nDim; iDim++) {
13901 if (static_fsi && val_update_geo) {
13904 for (iDim = 0; iDim <
nDim; iDim++) { Coord[iDim] =
Restart_Data[index+iDim];}
13906 for (iDim = 0; iDim <
nDim; iDim++) {
13919 if (iPoint_Global_Local <
nPointDomain) { sbuf_NotMatching = 1; }
13922 rbuf_NotMatching = sbuf_NotMatching;
13926 if (rbuf_NotMatching != 0) {
13927 SU2_MPI::Error(
string(
"The solution file ") + restart_filename +
string(
" doesn't match with the mesh file!\n") +
13928 string(
"It could be empty lines at the end of the file."),
CURRENT_FUNCTION);
13942 for (iMesh = 1; iMesh <= config->
GetnMGLevels(); iMesh++) {
13943 for (iPoint = 0; iPoint < geometry[iMesh]->
GetnPoint(); iPoint++) {
13945 for (iVar = 0; iVar <
nVar; iVar++)
Solution[iVar] = 0.0;
13946 for (iChildren = 0; iChildren < geometry[iMesh]->
node[iPoint]->
GetnChildren_CV(); iChildren++) {
13948 Area_Children = geometry[iMesh-1]->
node[Point_Fine]->
GetVolume();
13950 for (iVar = 0; iVar <
nVar; iVar++) {
13951 Solution[iVar] += Solution_Fine[iVar]*Area_Children/Area_Parent;
13963 if (grid_movement && val_update_geo) {
13981 for (iMesh = 1; iMesh <= config->
GetnMGLevels(); iMesh++) {
13982 iMeshFine = iMesh-1;
13985 geometry[iMesh]->
SetCoord(geometry[iMeshFine]);
13993 if (static_fsi && val_update_geo) {
14010 for (iMesh = 1; iMesh <= config->
GetnMGLevels(); iMesh++) {
14011 iMeshFine = iMesh-1;
14014 geometry[iMesh]->
SetCoord(geometry[iMeshFine]);
14031 unsigned long iPoint;
14032 unsigned short iDim;
14034 for (iPoint = 0; iPoint <
nPoint; iPoint++) {
14036 for (iDim = 0; iDim <
nDim; iDim++) {
14045 unsigned long iPoint;
14046 unsigned short iDim;
14047 unsigned short iZone = config->
GetiZone();
14048 su2double *turboVelocity, *cartVelocity, *turboNormal;
14063 turboVelocity[0] = cos(Alpha)*Mach*SoundSpeed;
14064 turboVelocity[1] = sin(Alpha)*Mach*SoundSpeed;
14068 turboVelocity[2] = 0.0;
14073 for (iPoint = 0; iPoint <
nPoint; iPoint++) {
14075 for (iDim = 0; iDim <
nDim; iDim++) {
14084 delete [] turboVelocity;
14085 delete [] cartVelocity;
14094 unsigned long iVertex, iPoint;
14095 unsigned short iDim, iMarker, iMarkerTP, iSpan;
14096 su2double Pressure = 0.0, Density = 0.0, *Velocity = NULL, *TurboVelocity,
14097 Area, TotalArea, TotalAreaPressure, TotalAreaDensity, *TotalAreaVelocity, *UnitNormal, *TurboNormal;
14098 string Marker_Tag, Monitoring_Tag;
14099 unsigned short iZone = config->
GetiZone();
14110 su2double MyTotalAreaDensity, MyTotalAreaPressure;
14117 for (iDim=0; iDim<
nDim; iDim++) {
14118 TotalAreaVelocity[iDim] = 0.0;
14121 TotalAreaPressure = 0.0;
14122 TotalAreaDensity = 0.0;
14124 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++){
14132 for (iVertex = 0; iVertex < geometry->
GetnVertexSpan(iMarker,iSpan); iVertex++) {
14146 for (iDim = 0; iDim <
nDim; iDim++) {
14148 VelSq += Velocity[iDim]*Velocity[iDim];
14155 TotalAreaPressure += Area*Pressure;
14156 TotalAreaDensity += Area*Density;
14157 for (iDim = 0; iDim <
nDim; iDim++)
14158 TotalAreaVelocity[iDim] += Area*Velocity[iDim];
14171 MyTotalAreaDensity = TotalAreaDensity; TotalAreaDensity = 0;
14172 MyTotalAreaPressure = TotalAreaPressure; TotalAreaPressure = 0;
14181 for (iDim = 0; iDim <
nDim; iDim++) {
14182 MyTotalAreaVelocity[iDim] = TotalAreaVelocity[iDim];
14183 TotalAreaVelocity[iDim] = 0.0;
14188 delete [] MyTotalAreaVelocity;
14196 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++){
14201 TotalArea = geometry->
GetSpanArea(iMarker,iSpan);
14208 for (iDim = 0; iDim <
nDim; iDim++)
14209 AverageVelocity[iMarker][iSpan][iDim] = TotalAreaVelocity[iDim] / TotalArea;
14216 for(iDim = 0; iDim <
nDim;iDim++)
14227 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++){
14238 for (iDim = 0; iDim <
nDim; iDim++)
14246 for(iDim = 0; iDim <
nDim;iDim++)
14256 delete [] Velocity;
14257 delete [] UnitNormal;
14258 delete [] TurboNormal;
14259 delete [] TurboVelocity;
14260 delete [] TotalAreaVelocity;
14267 unsigned long iVertex, iPoint, nVert;
14268 unsigned short iDim, iVar, iMarker, iMarkerTP, iSpan, jSpan;
14271 su2double Pressure = 0.0, Density = 0.0, Enthalpy = 0.0, *Velocity = NULL, *TurboVelocity,
14272 Area, TotalArea, Radius1, Radius2, Vt2, TotalAreaPressure, TotalAreaDensity, *TotalAreaVelocity, *UnitNormal, *TurboNormal,
14273 TotalMassPressure, TotalMassDensity, *TotalMassVelocity;
14274 string Marker_Tag, Monitoring_Tag;
14276 unsigned short iZone = config->
GetiZone();
14277 su2double TotalDensity, TotalPressure, *TotalVelocity, *AverageTurboNormal, *TotalFluxes;
14278 su2double TotalNu, TotalOmega, TotalKine, TotalMassNu, TotalMassOmega, TotalMassKine, TotalAreaNu, TotalAreaOmega, TotalAreaKine;
14295 su2double avgDensity, *avgVelocity, avgPressure, avgKine, avgOmega, avgNu, avgAreaDensity, *avgAreaVelocity, avgAreaPressure,
14296 avgAreaKine, avgAreaOmega, avgAreaNu, avgMassDensity, *avgMassVelocity, avgMassPressure, avgMassKine, avgMassOmega, avgMassNu,
14297 avgMixDensity, *avgMixVelocity, *avgMixTurboVelocity, avgMixPressure, avgMixKine, avgMixOmega, avgMixNu;
14307 su2double MyTotalDensity, MyTotalPressure, MyTotalAreaDensity, MyTotalAreaPressure, MyTotalMassPressure, MyTotalMassDensity, *MyTotalFluxes = NULL;
14308 su2double *MyTotalVelocity = NULL, *MyTotalAreaVelocity = NULL, *MyTotalMassVelocity = NULL;
14309 su2double MyTotalNu, MyTotalKine, MyTotalOmega, MyTotalAreaNu, MyTotalAreaKine, MyTotalAreaOmega, MyTotalMassNu, MyTotalMassKine, MyTotalMassOmega;
14316 for (iVar=0;iVar<
nVar;iVar++)
14317 TotalFluxes[iVar]= 0.0;
14318 for (iDim=0; iDim<
nDim; iDim++) {
14319 TotalVelocity[iDim] = 0.0;
14320 TotalAreaVelocity[iDim] = 0.0;
14321 TotalMassVelocity[iDim] = 0.0;
14324 TotalDensity = 0.0;
14325 TotalPressure = 0.0;
14326 TotalAreaPressure = 0.0;
14327 TotalAreaDensity = 0.0;
14328 TotalMassPressure = 0.0;
14329 TotalMassDensity = 0.0;
14334 TotalMassOmega = 0.0;
14335 TotalMassKine = 0.0;
14337 TotalAreaOmega = 0.0;
14338 TotalAreaKine = 0.0;
14345 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++){
14354 for (iVertex = 0; iVertex < geometry->
GetnVertexSpan(iMarker,iSpan); iVertex++) {
14366 su2double VelNormal = 0.0, VelSq = 0.0;
14368 for (iDim = 0; iDim <
nDim; iDim++) {
14370 VelNormal += UnitNormal[iDim]*Velocity[iDim];
14371 VelSq += Velocity[iDim]*Velocity[iDim];
14378 TotalDensity += Density;
14379 TotalPressure += Pressure;
14380 for (iDim = 0; iDim <
nDim; iDim++)
14381 TotalVelocity[iDim] += Velocity[iDim];
14383 TotalAreaPressure += Area*Pressure;
14384 TotalAreaDensity += Area*Density;
14385 for (iDim = 0; iDim <
nDim; iDim++)
14386 TotalAreaVelocity[iDim] += Area*Velocity[iDim];
14388 TotalMassPressure += Area*(Density*TurboVelocity[0] )*Pressure;
14389 TotalMassDensity += Area*(Density*TurboVelocity[0] )*Density;
14390 for (iDim = 0; iDim <
nDim; iDim++)
14391 TotalMassVelocity[iDim] += Area*(Density*TurboVelocity[0] )*Velocity[iDim];
14393 TotalFluxes[0] += Area*(Density*TurboVelocity[0]);
14394 TotalFluxes[1] += Area*(Density*TurboVelocity[0]*TurboVelocity[0] + Pressure);
14395 for (iDim = 2; iDim <
nDim+1; iDim++)
14396 TotalFluxes[iDim] += Area*(Density*TurboVelocity[0]*TurboVelocity[iDim -1]);
14397 TotalFluxes[
nDim+1] += Area*(Density*TurboVelocity[0]*Enthalpy);
14407 if(spalart_allmaras){
14412 TotalOmega += Omega;
14415 TotalAreaKine += Area*Kine;
14416 TotalAreaOmega += Area*Omega;
14417 TotalAreaNu += Area*Nu;
14419 TotalMassKine += Area*(Density*TurboVelocity[0] )*Kine;
14420 TotalMassOmega += Area*(Density*TurboVelocity[0] )*Omega;
14421 TotalMassNu += Area*(Density*TurboVelocity[0] )*Nu;
14429 for (iVertex = 0; iVertex < geometry->
GetnVertexSpan(iMarker,jSpan); iVertex++) {
14441 su2double VelNormal = 0.0, VelSq = 0.0;
14443 for (iDim = 0; iDim <
nDim; iDim++) {
14445 VelNormal += UnitNormal[iDim]*Velocity[iDim];
14446 VelSq += Velocity[iDim]*Velocity[iDim];
14453 TotalDensity += Density;
14454 TotalPressure += Pressure;
14455 for (iDim = 0; iDim <
nDim; iDim++)
14456 TotalVelocity[iDim] += Velocity[iDim];
14458 TotalAreaPressure += Area*Pressure;
14459 TotalAreaDensity += Area*Density;
14460 for (iDim = 0; iDim <
nDim; iDim++)
14461 TotalAreaVelocity[iDim] += Area*Velocity[iDim];
14463 TotalMassPressure += Area*(Density*TurboVelocity[0] )*Pressure;
14464 TotalMassDensity += Area*(Density*TurboVelocity[0] )*Density;
14465 for (iDim = 0; iDim <
nDim; iDim++)
14466 TotalMassVelocity[iDim] += Area*(Density*TurboVelocity[0] )*Velocity[iDim];
14468 TotalFluxes[0] += Area*(Density*TurboVelocity[0]);
14469 TotalFluxes[1] += Area*(Density*TurboVelocity[0]*TurboVelocity[0] + Pressure);
14470 for (iDim = 2; iDim <
nDim+1; iDim++)
14471 TotalFluxes[iDim] += Area*(Density*TurboVelocity[0]*TurboVelocity[iDim -1]);
14472 TotalFluxes[
nDim+1] += Area*(Density*TurboVelocity[0]*Enthalpy);
14482 if(spalart_allmaras){
14487 TotalOmega += Omega;
14490 TotalAreaKine += Area*Kine;
14491 TotalAreaOmega += Area*Omega;
14492 TotalAreaNu += Area*Nu;
14494 TotalMassKine += Area*(Density*TurboVelocity[0] )*Kine;
14495 TotalMassOmega += Area*(Density*TurboVelocity[0] )*Omega;
14496 TotalMassNu += Area*(Density*TurboVelocity[0] )*Nu;
14511 MyTotalDensity = TotalDensity; TotalDensity = 0;
14512 MyTotalPressure = TotalPressure; TotalPressure = 0;
14513 MyTotalAreaDensity = TotalAreaDensity; TotalAreaDensity = 0;
14514 MyTotalAreaPressure = TotalAreaPressure; TotalAreaPressure = 0;
14515 MyTotalMassDensity = TotalMassDensity; TotalMassDensity = 0;
14516 MyTotalMassPressure = TotalMassPressure; TotalMassPressure = 0;
14517 MyTotalNu = TotalNu; TotalNu = 0;
14518 MyTotalKine = TotalKine; TotalKine = 0;
14519 MyTotalOmega = TotalOmega; TotalOmega = 0;
14520 MyTotalAreaNu = TotalAreaNu; TotalAreaNu = 0;
14521 MyTotalAreaKine = TotalAreaKine; TotalAreaKine = 0;
14522 MyTotalAreaOmega = TotalAreaOmega; TotalAreaOmega = 0;
14523 MyTotalMassNu = TotalMassNu; TotalMassNu = 0;
14524 MyTotalMassKine = TotalMassKine; TotalMassKine = 0;
14525 MyTotalMassOmega = TotalMassOmega; TotalMassOmega = 0;
14552 for (iVar = 0; iVar <
nVar; iVar++) {
14553 MyTotalFluxes[iVar] = TotalFluxes[iVar];
14554 TotalFluxes[iVar] = 0.0;
14557 for (iDim = 0; iDim <
nDim; iDim++) {
14558 MyTotalVelocity[iDim] = TotalVelocity[iDim];
14559 TotalVelocity[iDim] = 0.0;
14560 MyTotalAreaVelocity[iDim] = TotalAreaVelocity[iDim];
14561 TotalAreaVelocity[iDim] = 0.0;
14562 MyTotalMassVelocity[iDim] = TotalMassVelocity[iDim];
14563 TotalMassVelocity[iDim] = 0.0;
14571 delete [] MyTotalFluxes;
delete [] MyTotalVelocity;
delete [] MyTotalAreaVelocity;
delete [] MyTotalMassVelocity;
14577 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++){
14582 TotalArea = geometry->
GetSpanArea(iMarker,iSpan);
14591 MachTest = TotalFluxes[0]/(TotalAreaDensity*soundSpeed);
14596 avgDensity = TotalDensity / nVert;
14597 avgPressure = TotalPressure / nVert;
14598 for (iDim = 0; iDim <
nDim; iDim++) avgVelocity[iDim] = TotalVelocity[iDim] / nVert;
14599 avgKine = TotalKine/nVert;
14600 avgOmega = TotalOmega/nVert;
14601 avgNu = TotalNu/nVert;
14604 avgAreaDensity = TotalAreaDensity / TotalArea;
14605 avgAreaPressure = TotalAreaPressure / TotalArea;
14606 for (iDim = 0; iDim <
nDim; iDim++) avgAreaVelocity[iDim] = TotalAreaVelocity[iDim] / TotalArea;
14607 avgAreaKine = TotalAreaKine / TotalArea;
14608 avgAreaOmega = TotalAreaOmega / TotalArea;
14609 avgAreaNu = TotalAreaNu / TotalArea;
14613 avgMassDensity = avgAreaDensity;
14614 avgMassPressure = avgAreaPressure;
14615 for (iDim = 0; iDim <
nDim; iDim++) avgMassVelocity[iDim] = avgAreaVelocity[iDim];
14616 avgMassKine = avgAreaKine;
14617 avgMassOmega = avgAreaOmega;
14618 avgMassNu = avgAreaNu;
14620 avgMassDensity = TotalMassDensity / TotalFluxes[0];
14621 avgMassPressure = TotalMassPressure / TotalFluxes[0];
14622 for (iDim = 0; iDim <
nDim; iDim++) avgMassVelocity[iDim] = TotalMassVelocity[iDim] / TotalFluxes[0];
14623 avgMassKine = TotalMassKine / TotalFluxes[0];
14624 avgMassOmega = TotalMassOmega / TotalFluxes[0];
14625 avgMassNu = TotalMassNu / TotalFluxes[0];
14628 for (iVar = 0; iVar<
nVar; iVar++){
14629 AverageFlux[iMarker][iSpan][iVar] = TotalFluxes[iVar]/TotalArea;
14635 avgMixDensity = avgAreaDensity;
14636 avgMixPressure = avgAreaPressure;
14637 for (iDim = 0; iDim <
nDim; iDim++)
14638 avgMixVelocity[iDim] = avgAreaVelocity[iDim];
14640 avgMixKine = avgAreaKine;
14641 avgMixOmega = avgAreaOmega;
14642 avgMixNu = avgAreaNu;
14645 avgMixTurboVelocity[0] = (
AverageFlux[iMarker][iSpan][1] - avgMixPressure) /
AverageFlux[iMarker][iSpan][0];
14646 for (iDim = 2; iDim <
nDim +1;iDim++)
14649 if (avgMixDensity!= avgMixDensity || avgMixPressure!= avgMixPressure || avgMixPressure < 0.0 || avgMixDensity < 0.0 ){
14650 val_init_pressure = avgAreaPressure;
14652 avgMixTurboVelocity[0] = (
AverageFlux[iMarker][iSpan][1] - avgMixPressure) /
AverageFlux[iMarker][iSpan][0];
14653 for (iDim = 2; iDim <
nDim +1;iDim++)
14656 avgMixKine = avgMassKine;
14657 avgMixOmega = avgMassOmega;
14658 avgMixNu = avgMassNu;
14662 switch(average_process){
14706 cout<<
"nan in mixing process routine for iSpan: " << iSpan<<
" in marker " << config->
GetMarker_All_TagBound(iMarker)<< endl;
14709 for(iDim = 0; iDim <
nDim;iDim++)
14715 cout <<
" negative density or pressure in mixing process routine for iSpan: " << iSpan<<
" in marker " << config->
GetMarker_All_TagBound(iMarker)<< endl;
14718 for(iDim = 0; iDim <
nDim;iDim++)
14725 for(iDim = 0; iDim <
nDim;iDim++)
14738 switch(performance_average_process){
14740 if(marker_flag ==
INFLOW){
14741 DensityIn[iMarkerTP - 1][iSpan] = avgDensity;
14742 PressureIn[iMarkerTP - 1][iSpan] = avgPressure;
14744 KineIn[iMarkerTP - 1][iSpan] = avgKine;
14745 OmegaIn[iMarkerTP - 1][iSpan] = avgOmega;
14746 NuIn[iMarkerTP - 1][iSpan] = avgNu;
14749 DensityOut[iMarkerTP - 1][iSpan] = avgDensity;
14752 KineOut[iMarkerTP - 1][iSpan] = avgKine;
14753 OmegaOut[iMarkerTP - 1][iSpan] = avgOmega;
14754 NuOut[iMarkerTP - 1][iSpan] = avgNu;
14759 if(marker_flag ==
INFLOW){
14760 DensityIn[iMarkerTP - 1][iSpan] = avgAreaDensity;
14761 PressureIn[iMarkerTP - 1][iSpan] = avgAreaPressure;
14763 KineIn[iMarkerTP - 1][iSpan] = avgAreaKine;
14764 OmegaIn[iMarkerTP - 1][iSpan] = avgAreaOmega;
14765 NuIn[iMarkerTP - 1][iSpan] = avgAreaNu;
14768 DensityOut[iMarkerTP - 1][iSpan] = avgAreaDensity;
14769 PressureOut[iMarkerTP - 1][iSpan] = avgAreaPressure;
14771 KineOut[iMarkerTP - 1][iSpan] = avgAreaKine;
14772 OmegaOut[iMarkerTP - 1][iSpan] = avgAreaOmega;
14773 NuOut[iMarkerTP - 1][iSpan] = avgAreaNu/TotalArea;
14778 if(marker_flag ==
INFLOW){
14779 DensityIn[iMarkerTP - 1][iSpan] = avgMassDensity;
14780 PressureIn[iMarkerTP - 1][iSpan] = avgMassPressure;
14782 KineIn[iMarkerTP - 1][iSpan] = avgMassKine;
14783 OmegaIn[iMarkerTP - 1][iSpan] = avgMassOmega;
14784 NuIn[iMarkerTP - 1][iSpan] = avgMassNu;
14787 DensityOut[iMarkerTP - 1][iSpan] = avgMassDensity;
14788 PressureOut[iMarkerTP - 1][iSpan] = avgMassPressure;
14790 KineOut[iMarkerTP - 1][iSpan] = avgMassKine;
14791 OmegaOut[iMarkerTP - 1][iSpan] = avgMassOmega;
14792 NuOut[iMarkerTP - 1][iSpan] = avgMassNu;
14798 if (marker_flag ==
INFLOW){
14799 DensityIn[iMarkerTP - 1][iSpan] = avgMixDensity;
14800 PressureIn[iMarkerTP - 1][iSpan] = avgMixPressure;
14801 for (iDim = 0; iDim <
nDim; iDim++)
TurboVelocityIn[iMarkerTP -1][iSpan][iDim] = avgMixTurboVelocity[iDim];
14802 KineIn[iMarkerTP - 1][iSpan] = avgMixKine;
14803 OmegaIn[iMarkerTP - 1][iSpan] = avgMixOmega;
14804 NuIn[iMarkerTP - 1][iSpan] = avgMixNu;
14807 DensityOut[iMarkerTP - 1][iSpan] = avgMixDensity;
14808 PressureOut[iMarkerTP - 1][iSpan] = avgMixPressure;
14809 for (iDim = 0; iDim <
nDim; iDim++)
TurboVelocityOut[iMarkerTP -1][iSpan][iDim] = avgMixTurboVelocity[iDim];
14810 KineOut[iMarkerTP - 1][iSpan] = avgMixKine;
14811 OmegaOut[iMarkerTP - 1][iSpan] = avgMixOmega;
14812 NuOut[iMarkerTP - 1][iSpan] = avgMixNu;
14830 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++){
14877 delete [] Velocity;
14878 delete [] UnitNormal;
14879 delete [] TurboNormal;
14880 delete [] TurboVelocity;
14881 delete [] TotalVelocity;
14882 delete [] TotalAreaVelocity;
14883 delete [] TotalFluxes;
14884 delete [] TotalMassVelocity;
14885 delete [] avgVelocity;
14886 delete [] avgAreaVelocity;
14887 delete [] avgMassVelocity;
14888 delete [] avgMixVelocity;
14889 delete [] avgMixTurboVelocity;
14898 unsigned short iter = 0, iDim;
14902 su2double dhdP, dhdrho, enthalpy_mix, velsq, *vel;
14906 pressure_mix = val_init_pressure;
14910 while ( iter <= maxiter ) {
14912 density_mix = val_Averaged_Flux[0]*val_Averaged_Flux[0]/(val_Averaged_Flux[1] - pressure_mix);
14920 vel[0] = (val_Averaged_Flux[1] - pressure_mix) / val_Averaged_Flux[0];
14921 for (iDim = 1; iDim <
nDim; iDim++) {
14922 vel[iDim] = val_Averaged_Flux[iDim+1] / val_Averaged_Flux[0];
14926 for (
unsigned short iDim = 0; iDim <
nDim; iDim++) {
14927 velsq += vel[iDim]*vel[iDim];
14929 f = val_Averaged_Flux[
nDim+1] - val_Averaged_Flux[0]*(enthalpy_mix + velsq/2);
14930 df = -val_Averaged_Flux[0]*(dhdP - 1/density_mix) - dhdrho*density_mix*density_mix/val_Averaged_Flux[0];
14932 resdl = dx/val_init_pressure;
14933 pressure_mix += relax_factor*dx;
14936 if ( abs(resdl) <= toll ) {
14942 density_mix = val_Averaged_Flux[0]*val_Averaged_Flux[0]/(val_Averaged_Flux[1] - pressure_mix);
14951 unsigned short iMarker, iMarkerTP;
14952 unsigned short iSpan;
14954 su2double densityIn, pressureIn, normalVelocityIn, tangVelocityIn, radialVelocityIn;
14955 su2double densityOut, pressureOut, normalVelocityOut, tangVelocityOut, radialVelocityOut;
14956 su2double kineIn, omegaIn, nuIn, kineOut, omegaOut, nuOut;
14962 unsigned short i, n1, n2, n1t,n2t;
14963 su2double *TurbPerfIn= NULL,*TurbPerfOut= NULL;
14964 su2double *TotTurbPerfIn = NULL,*TotTurbPerfOut = NULL;
14965 int *TotMarkerTP = NULL;
14975 TurbPerfIn[i] = -1.0;
14977 TurbPerfOut[i] = -1.0;
14983 normalVelocityIn = -1.0;
14984 tangVelocityIn = -1.0;
14985 radialVelocityIn = -1.0;
14987 pressureOut = -1.0;
14988 normalVelocityOut = -1.0;
14989 tangVelocityOut = -1.0;
14990 radialVelocityOut = -1.0;
15001 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++){
15005 markerTP = iMarkerTP;
15006 densityIn =
DensityIn[iMarkerTP -1][iSpan];
15007 pressureIn =
PressureIn[iMarkerTP -1][iSpan];
15013 kineIn =
KineIn[iMarkerTP -1][iSpan];
15014 omegaIn =
OmegaIn[iMarkerTP -1][iSpan];
15015 nuIn =
NuIn[iMarkerTP -1][iSpan];
15019 TurbPerfIn[0] = densityIn;
15020 TurbPerfIn[1] = pressureIn;
15021 TurbPerfIn[2] = normalVelocityIn;
15022 TurbPerfIn[3] = tangVelocityIn;
15023 TurbPerfIn[4] = radialVelocityIn;
15024 TurbPerfIn[5] = kineIn;
15025 TurbPerfIn[6] = omegaIn;
15026 TurbPerfIn[7] = nuIn;
15032 densityOut =
DensityOut[iMarkerTP -1][iSpan];
15039 kineOut =
KineOut[iMarkerTP -1][iSpan];
15040 omegaOut =
OmegaOut[iMarkerTP -1][iSpan];
15041 nuOut =
NuOut[iMarkerTP -1][iSpan];
15046 TurbPerfOut[0] = densityOut;
15047 TurbPerfOut[1] = pressureOut;
15048 TurbPerfOut[2] = normalVelocityOut;
15049 TurbPerfOut[3] = tangVelocityOut;
15050 TurbPerfOut[4] = radialVelocityOut;
15051 TurbPerfOut[5] = kineOut;
15052 TurbPerfOut[6] = omegaOut;
15053 TurbPerfOut[7] = nuOut;
15064 for (i=0;i<n1t;i++)
15065 TotTurbPerfIn[i] = -1.0;
15066 for (i=0;i<n2t;i++)
15067 TotTurbPerfOut[i] = -1.0;
15068 TotMarkerTP =
new int[
size];
15069 for(i=0; i<
size; i++){
15070 TotMarkerTP[i] = -1;
15077 delete [] TurbPerfIn,
delete [] TurbPerfOut;
15081 for (i=0;i<
size;i++){
15082 if(TotTurbPerfIn[n1*i] > 0.0){
15084 densityIn = TotTurbPerfIn[n1*i];
15086 pressureIn = TotTurbPerfIn[n1*i+1];
15087 normalVelocityIn = 0.0;
15088 normalVelocityIn = TotTurbPerfIn[n1*i+2];
15089 tangVelocityIn = 0.0;
15090 tangVelocityIn = TotTurbPerfIn[n1*i+3];
15091 radialVelocityIn = 0.0;
15092 radialVelocityIn = TotTurbPerfIn[n1*i+4];
15094 kineIn = TotTurbPerfIn[n1*i+5];
15096 omegaIn = TotTurbPerfIn[n1*i+6];
15098 nuIn = TotTurbPerfIn[n1*i+7];
15101 markerTP = TotMarkerTP[i];
15104 if(TotTurbPerfOut[n2*i] > 0.0){
15106 densityOut = TotTurbPerfOut[n1*i];
15108 pressureOut = TotTurbPerfOut[n1*i+1];
15109 normalVelocityOut = 0.0;
15110 normalVelocityOut = TotTurbPerfOut[n1*i+2];
15111 tangVelocityOut = 0.0;
15112 tangVelocityOut = TotTurbPerfOut[n1*i+3];
15113 radialVelocityOut = 0.0;
15114 radialVelocityOut = TotTurbPerfOut[n1*i+4];
15116 kineOut = TotTurbPerfOut[n1*i+5];
15118 omegaOut = TotTurbPerfOut[n1*i+6];
15120 nuOut = TotTurbPerfOut[n1*i+7];
15124 delete [] TotTurbPerfIn,
delete [] TotTurbPerfOut;
delete [] TotMarkerTP;
15131 DensityIn[markerTP -1][iSpan] = densityIn;
15132 PressureIn[markerTP -1][iSpan] = pressureIn;
15137 KineIn[markerTP -1][iSpan] = kineIn;
15138 OmegaIn[markerTP -1][iSpan] = omegaIn;
15139 NuIn[markerTP -1][iSpan] = nuIn;
15141 DensityOut[markerTP -1][iSpan] = densityOut;
15147 KineOut[markerTP -1][iSpan] = kineOut;
15148 OmegaOut[markerTP -1][iSpan] = omegaOut;
15149 NuOut[markerTP -1][iSpan] = nuOut;
15158 CD_Visc = NULL; CL_Visc = NULL; CSF_Visc = NULL; CEff_Visc = NULL;
15159 CFx_Visc = NULL; CFy_Visc = NULL; CFz_Visc = NULL;
15160 CMx_Visc = NULL; CMy_Visc = NULL; CMz_Visc = NULL;
15161 CoPx_Visc = NULL; CoPy_Visc = NULL; CoPz_Visc = NULL;
15163 ForceViscous = NULL; MomentViscous = NULL; CSkinFriction = NULL;
15165 Buffet_Sensor = NULL; Buffet_Metric = NULL;
15169 Surface_CL_Visc = NULL; Surface_CD_Visc = NULL; Surface_CSF_Visc = NULL; Surface_CEff_Visc = NULL;
15170 Surface_CFx_Visc = NULL; Surface_CFy_Visc = NULL; Surface_CFz_Visc = NULL;
15171 Surface_CMx_Visc = NULL; Surface_CMy_Visc = NULL; Surface_CMz_Visc = NULL;
15176 CMerit_Visc = NULL; CT_Visc = NULL; CQ_Visc = NULL;
15190 unsigned long iPoint, counter_local = 0, counter_global = 0, iVertex;
15191 unsigned short iVar, iDim, iMarker, nLineLets;
15192 su2double Density, Velocity2, Pressure, Temperature, StaticEnergy;
15193 ifstream restart_file;
15194 unsigned short nZone = geometry->
GetnZone();
15196 int Unst_RestartIter;
15197 unsigned short iZone = config->
GetiZone();
15216 if (!(!restart || (iMesh !=
MESH_0) || nZone > 1)) {
15234 if (time_stepping) {
15248 CD_Visc = NULL; CL_Visc = NULL; CSF_Visc = NULL; CEff_Visc = NULL;
15249 CFx_Visc = NULL; CFy_Visc = NULL; CFz_Visc = NULL;
15250 CMx_Visc = NULL; CMy_Visc = NULL; CMz_Visc = NULL;
15251 CoPx_Visc = NULL; CoPy_Visc = NULL; CoPz_Visc = NULL;
15253 Buffet_Sensor = NULL; Buffet_Metric = NULL;
15255 Surface_CL_Visc = NULL; Surface_CD_Visc = NULL; Surface_CSF_Visc = NULL; Surface_CEff_Visc = NULL;
15256 Surface_CFx_Visc = NULL; Surface_CFy_Visc = NULL; Surface_CFz_Visc = NULL;
15257 Surface_CMx_Visc = NULL; Surface_CMy_Visc = NULL; Surface_CMz_Visc = NULL;
15260 Surface_Buffet_Metric = NULL;
15262 CMerit_Visc = NULL; CT_Visc = NULL; CQ_Visc = NULL;
15263 MaxHF_Visc = NULL; ForceViscous = NULL; MomentViscous = NULL;
15264 CSkinFriction = NULL;
Cauchy_Serie = NULL; HF_Visc = NULL;
15265 HeatConjugateVar = NULL;
15335 for (iMarker = 0; iMarker <
nMarker; iMarker++)
15361 for (iVar = 0; iVar <
nVar; iVar++) {
15399 if (roe_turkel || low_mach_prec) {
15401 for (iVar = 0; iVar <
nVar; iVar ++)
15418 for (iVar = 0; iVar <
nVar; iVar++) {
15423 if (
rank ==
MASTER_NODE) cout <<
"Initialize Jacobian structure (Navier-Stokes). MG level: " << iMesh <<
"." << endl;
15429 if (
rank ==
MASTER_NODE) cout <<
"Compute linelet structure. " << nLineLets <<
" elements in each line (average)." << endl;
15436 cout <<
"Explicit scheme. No Jacobian structure (Navier-Stokes). MG level: " << iMesh <<
"." << endl;
15446 for (iDim = 0; iDim <
nDim; iDim++)
15457 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
15459 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15461 for (iVar = 0; iVar <
nPrimVar; iVar++) {
15471 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
15473 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15476 for (iVar = 0; iVar <
nPrimVar + 2 ; iVar++) {
15482 for (iVar = 0; iVar <
nPrimVar ; iVar++) {
15491 unsigned short nHeatConjugateVar = 4;
15494 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
15496 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15498 HeatConjugateVar[iMarker][iVertex] =
new su2double [nHeatConjugateVar];
15499 for (iVar = 1; iVar < nHeatConjugateVar ; iVar++) {
15500 HeatConjugateVar[iMarker][iVertex][iVar] = 0.0;
15509 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
15511 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15519 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
15521 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15529 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
15531 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15539 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
15541 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15549 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
15551 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15559 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
15561 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15563 for (iDim = 0; iDim <
nDim; iDim++) {
15573 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
15576 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15586 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
15589 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15598 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
15600 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15601 YPlus[iMarker][iVertex] = 0.0;
15608 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
15610 for (iDim = 0; iDim <
nDim; iDim++) {
15612 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
15613 CSkinFriction[iMarker][iDim][iVertex] = 0.0;
15623 for(iMarker = 0; iMarker <
nMarker; iMarker++) {
15803 switch(direct_diff) {
15829 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
15846 for (iMarker = 0; iMarker <
nMarker; iMarker++){
15856 for (iPoint = 0; iPoint < geometry->
GetnVertex(iMarker); iPoint++){
15860 for (iVar = 0; iVar <
nPrimVar+1; iVar++)
15869 for (iPoint = 0; iPoint <
nPoint; iPoint++)
15876 for (iPoint = 0; iPoint <
nPoint; iPoint++) {
15881 for (iDim = 0; iDim <
nDim; iDim++)
15882 Velocity2 += (
node[iPoint]->GetSolution(iDim+1)/Density)*(
node[iPoint]->
GetSolution(iDim+1)/Density);
15892 if ((Pressure < 0.0) || (Density < 0.0) || (Temperature < 0.0)) {
15894 for (iDim = 0; iDim <
nDim; iDim++)
15914 counter_global = counter_local;
15917 cout <<
"Warning. The original solution contains "<< counter_global <<
" points that are not physical." << endl;
15929 for (iVar = 0; iVar <
nVar; iVar++) {
15954 unsigned short iMarker, iDim;
15956 unsigned long iVertex;
15958 if (CD_Visc != NULL)
delete [] CD_Visc;
15959 if (CL_Visc != NULL)
delete [] CL_Visc;
15960 if (CSF_Visc != NULL)
delete [] CSF_Visc;
15961 if (CFx_Visc != NULL)
delete [] CFx_Visc;
15962 if (CFy_Visc != NULL)
delete [] CFy_Visc;
15963 if (CFz_Visc != NULL)
delete [] CFz_Visc;
15964 if (CMx_Visc != NULL)
delete [] CMx_Visc;
15965 if (CMy_Visc != NULL)
delete [] CMy_Visc;
15966 if (CMz_Visc != NULL)
delete [] CMz_Visc;
15967 if (CoPx_Visc != NULL)
delete [] CoPx_Visc;
15968 if (CoPy_Visc != NULL)
delete [] CoPy_Visc;
15969 if (CoPz_Visc != NULL)
delete [] CoPz_Visc;
15970 if (CEff_Visc != NULL)
delete [] CEff_Visc;
15971 if (CMerit_Visc != NULL)
delete [] CMerit_Visc;
15972 if (Buffet_Metric != NULL)
delete [] Buffet_Metric;
15973 if (CT_Visc != NULL)
delete [] CT_Visc;
15974 if (CQ_Visc != NULL)
delete [] CQ_Visc;
15975 if (HF_Visc != NULL)
delete [] HF_Visc;
15976 if (MaxHF_Visc != NULL)
delete [] MaxHF_Visc;
15977 if (ForceViscous != NULL)
delete [] ForceViscous;
15978 if (MomentViscous != NULL)
delete [] MomentViscous;
15980 if (Surface_CL_Visc != NULL)
delete [] Surface_CL_Visc;
15981 if (Surface_CD_Visc != NULL)
delete [] Surface_CD_Visc;
15982 if (Surface_CSF_Visc != NULL)
delete [] Surface_CSF_Visc;
15983 if (Surface_CEff_Visc != NULL)
delete [] Surface_CEff_Visc;
15984 if (Surface_CFx_Visc != NULL)
delete [] Surface_CFx_Visc;
15985 if (Surface_CFy_Visc != NULL)
delete [] Surface_CFy_Visc;
15986 if (Surface_CFz_Visc != NULL)
delete [] Surface_CFz_Visc;
15987 if (Surface_CMx_Visc != NULL)
delete [] Surface_CMx_Visc;
15988 if (Surface_CMy_Visc != NULL)
delete [] Surface_CMy_Visc;
15989 if (Surface_CMz_Visc != NULL)
delete [] Surface_CMz_Visc;
15992 if (Surface_Buffet_Metric != NULL)
delete [] Surface_Buffet_Metric;
15994 if (CSkinFriction != NULL) {
15995 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
15996 for (iDim = 0; iDim <
nDim; iDim++) {
15997 delete [] CSkinFriction[iMarker][iDim];
15999 delete [] CSkinFriction[iMarker];
16001 delete [] CSkinFriction;
16004 if (HeatConjugateVar != NULL) {
16005 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
16006 for (iVertex = 0; iVertex <
nVertex[iMarker]; iVertex++) {
16007 delete [] HeatConjugateVar[iMarker][iVertex];
16009 delete [] HeatConjugateVar[iMarker];
16011 delete [] HeatConjugateVar;
16014 if (Buffet_Sensor != NULL) {
16015 for (iMarker = 0; iMarker <
nMarker; iMarker++){
16016 delete [] Buffet_Sensor[iMarker];
16018 delete [] Buffet_Sensor;
16025 unsigned long iPoint, ErrorCounter = 0;
16026 su2double StrainMag = 0.0, Omega = 0.0, *Vorticity;
16028 unsigned long ExtIter = config->
GetExtIter();
16041 bool interface = (config->GetnMarker_InterfaceBound() != 0);
16049 if ((fixed_cl) && (!disc_adjoint) && (!cont_adjoint)) {
SetFarfield_AoA(geometry, solver_container, config, iMesh, Output); }
16061 if (actuator_disk) {
16076 if (center && !Output) {
16078 if ((center_jst) && (iMesh ==
MESH_0)) {
16086 if (roe_low_dissipation){
16105 if ((iMesh ==
MESH_0) && (limiter_flow || limiter_turb || limiter_adjflow)
16110 StrainMag_Max = 0.0; Omega_Max = 0.0;
16111 for (iPoint = 0; iPoint <
nPoint; iPoint++) {
16118 Omega = sqrt(Vorticity[0]*Vorticity[0]+ Vorticity[1]*Vorticity[1]+ Vorticity[2]*Vorticity[2]);
16120 StrainMag_Max = max(StrainMag_Max, StrainMag);
16121 Omega_Max = max(Omega_Max, Omega);
16127 if (wall_functions)
16139 unsigned long MyErrorCounter = ErrorCounter; ErrorCounter = 0;
16140 su2double MyOmega_Max = Omega_Max; Omega_Max = 0.0;
16141 su2double MyStrainMag_Max = StrainMag_Max; StrainMag_Max = 0.0;
16160 unsigned long iPoint, ErrorCounter = 0;
16161 su2double eddy_visc = 0.0, turb_ke = 0.0, DES_LengthScale = 0.0;
16163 bool RightSol =
true;
16165 bool tkeNeeded = (turb_model ==
SST);
16167 for (iPoint = 0; iPoint <
nPoint; iPoint ++) {
16171 if (turb_model !=
NONE) {
16201 return ErrorCounter;
16206 su2double *Normal, Area, Vol, Mean_SoundSpeed = 0.0, Mean_ProjVel = 0.0, Lambda, Local_Delta_Time, Local_Delta_Time_Visc,
16207 Global_Delta_Time = 1E6, Mean_LaminarVisc = 0.0, Mean_EddyVisc = 0.0, Mean_Density = 0.0, Lambda_1, Lambda_2, K_v = 0.25, Global_Delta_UnstTimeND;
16208 unsigned long iEdge, iVertex, iPoint = 0, jPoint = 0;
16209 unsigned short iDim, iMarker;
16210 su2double ProjVel, ProjVel_i, ProjVel_j;
16228 for (iEdge = 0; iEdge < geometry->
GetnEdge(); iEdge++) {
16236 Area = 0;
for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim]; Area = sqrt(Area);
16245 if (grid_movement) {
16248 ProjVel_i = 0.0; ProjVel_j =0.0;
16249 for (iDim = 0; iDim <
nDim; iDim++) {
16250 ProjVel_i += GridVel_i[iDim]*Normal[iDim];
16251 ProjVel_j += GridVel_j[iDim]*Normal[iDim];
16253 Mean_ProjVel -= 0.5 * (ProjVel_i + ProjVel_j) ;
16258 Lambda = fabs(Mean_ProjVel) + Mean_SoundSpeed ;
16268 Lambda_1 = (4.0/3.0)*(Mean_LaminarVisc + Mean_EddyVisc);
16270 Lambda_2 = (1.0 + (Prandtl_Lam/Prandtl_Turb)*(Mean_EddyVisc/Mean_LaminarVisc))*(
Gamma*Mean_LaminarVisc/Prandtl_Lam);
16271 Lambda = (Lambda_1 + Lambda_2)*Area*Area/Mean_Density;
16273 if (geometry->
node[iPoint]->
GetDomain())
node[iPoint]->AddMax_Lambda_Visc(Lambda);
16274 if (geometry->
node[jPoint]->
GetDomain())
node[jPoint]->AddMax_Lambda_Visc(Lambda);
16280 for (iMarker = 0; iMarker < geometry->
GetnMarker(); iMarker++) {
16282 for (iVertex = 0; iVertex < geometry->
GetnVertex(iMarker); iVertex++) {
16288 Area = 0.0;
for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim]; Area = sqrt(Area);
16297 if (grid_movement) {
16300 for (iDim = 0; iDim <
nDim; iDim++)
16301 ProjVel += GridVel[iDim]*Normal[iDim];
16302 Mean_ProjVel -= ProjVel;
16307 Lambda = fabs(Mean_ProjVel) + Mean_SoundSpeed;
16318 Lambda_1 = (4.0/3.0)*(Mean_LaminarVisc + Mean_EddyVisc);
16319 Lambda_2 = (1.0 + (Prandtl_Lam/Prandtl_Turb)*(Mean_EddyVisc/Mean_LaminarVisc))*(
Gamma*Mean_LaminarVisc/Prandtl_Lam);
16320 Lambda = (Lambda_1 + Lambda_2)*Area*Area/Mean_Density;
16322 if (geometry->
node[iPoint]->
GetDomain())
node[iPoint]->AddMax_Lambda_Visc(Lambda);
16337 Local_Delta_Time = min(Local_Delta_Time, Local_Delta_Time_Visc);
16338 Global_Delta_Time = min(Global_Delta_Time, Local_Delta_Time);
16372 sbuf_time = Global_Delta_Time;
16375 Global_Delta_Time = rbuf_time;
16378 node[iPoint]->SetDelta_Time(Global_Delta_Time);
16383 if ((dual_time) && (Iteration == 0) && (config->
GetUnst_CFL() != 0.0) && (iMesh ==
MESH_0)) {
16384 Global_Delta_UnstTimeND = config->
GetUnst_CFL()*Global_Delta_Time/config->
GetCFL(iMesh);
16388 sbuf_time = Global_Delta_UnstTimeND;
16391 Global_Delta_UnstTimeND = rbuf_time;
16408 CConfig *config,
unsigned short iMesh,
unsigned short iRKStep) {
16410 unsigned long iPoint, jPoint, iEdge;
16414 for (iEdge = 0; iEdge < geometry->
GetnEdge(); iEdge++) {
16464 unsigned long iVertex, iPoint, iPointNormal;
16465 unsigned short Boundary, Monitoring, iMarker, iMarker_Monitoring, iDim, jDim;
16466 su2double Viscosity = 0.0, div_vel, *Normal, MomentDist[3] = {0.0, 0.0, 0.0}, WallDist[3] = {0.0, 0.0, 0.0},
16467 *Coord, *Coord_Normal, Area, WallShearStress, TauNormal, factor, RefTemp, RefVel2,
16468 RefDensity, GradTemperature, Density = 0.0, WallDistMod, FrictionVel,
16469 Mach2Vel, Mach_Motion, UnitNormal[3] = {0.0, 0.0, 0.0}, TauElem[3] = {0.0, 0.0, 0.0}, TauTangent[3] = {0.0, 0.0, 0.0},
16470 Tau[3][3] = {{0.0, 0.0, 0.0},{0.0, 0.0, 0.0},{0.0, 0.0, 0.0}}, Force[3] = {0.0, 0.0, 0.0}, Cp, thermal_conductivity, MaxNorm = 8.0,
16471 Grad_Vel[3][3] = {{0.0, 0.0, 0.0},{0.0, 0.0, 0.0},{0.0, 0.0, 0.0}}, Grad_Temp[3] = {0.0, 0.0, 0.0},
16472 delta[3][3] = {{1.0, 0.0, 0.0},{0.0,1.0,0.0},{0.0,0.0,1.0}};
16473 su2double MomentX_Force[3] = {0.0,0.0,0.0}, MomentY_Force[3] = {0.0,0.0,0.0}, MomentZ_Force[3] = {0.0,0.0,0.0};
16477 su2double MyAllBound_CD_Visc, MyAllBound_CL_Visc, MyAllBound_CSF_Visc, MyAllBound_CMx_Visc, MyAllBound_CMy_Visc, MyAllBound_CMz_Visc, MyAllBound_CoPx_Visc, MyAllBound_CoPy_Visc, MyAllBound_CoPz_Visc, MyAllBound_CFx_Visc, MyAllBound_CFy_Visc, MyAllBound_CFz_Visc, MyAllBound_CT_Visc, MyAllBound_CQ_Visc, MyAllBound_HF_Visc, MyAllBound_MaxHF_Visc, *MySurface_CL_Visc = NULL, *MySurface_CD_Visc = NULL, *MySurface_CSF_Visc = NULL, *MySurface_CEff_Visc = NULL, *MySurface_CFx_Visc = NULL, *MySurface_CFy_Visc = NULL, *MySurface_CFz_Visc = NULL, *MySurface_CMx_Visc = NULL, *MySurface_CMy_Visc = NULL, *MySurface_CMz_Visc = NULL, *MySurface_HF_Visc = NULL, *MySurface_MaxHF_Visc;
16480 string Marker_Tag, Monitoring_Tag;
16493 bool QCR = config->
GetQCR();
16503 if (grid_movement) {
16504 Mach2Vel = sqrt(
Gamma*Gas_Constant*RefTemp);
16506 RefVel2 = (Mach_Motion*Mach2Vel)*(Mach_Motion*Mach2Vel);
16509 for (iDim = 0; iDim <
nDim; iDim++)
16513 factor = 1.0 / (0.5*RefDensity*RefArea*RefVel2);
16517 AllBound_CD_Visc = 0.0; AllBound_CL_Visc = 0.0; AllBound_CSF_Visc = 0.0;
16518 AllBound_CFx_Visc = 0.0; AllBound_CFy_Visc = 0.0; AllBound_CFz_Visc = 0.0;
16519 AllBound_CMx_Visc = 0.0; AllBound_CMy_Visc = 0.0; AllBound_CMz_Visc = 0.0;
16520 AllBound_CoPx_Visc = 0.0; AllBound_CoPy_Visc = 0.0; AllBound_CoPz_Visc = 0.0;
16521 AllBound_CT_Visc = 0.0; AllBound_CQ_Visc = 0.0; AllBound_CMerit_Visc = 0.0;
16522 AllBound_HF_Visc = 0.0; AllBound_MaxHF_Visc = 0.0; AllBound_CEff_Visc = 0.0;
16524 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
16525 Surface_CL_Visc[iMarker_Monitoring] = 0.0; Surface_CD_Visc[iMarker_Monitoring] = 0.0;
16526 Surface_CSF_Visc[iMarker_Monitoring] = 0.0; Surface_CEff_Visc[iMarker_Monitoring] = 0.0;
16527 Surface_CFx_Visc[iMarker_Monitoring] = 0.0; Surface_CFy_Visc[iMarker_Monitoring] = 0.0;
16528 Surface_CFz_Visc[iMarker_Monitoring] = 0.0; Surface_CMx_Visc[iMarker_Monitoring] = 0.0;
16529 Surface_CMy_Visc[iMarker_Monitoring] = 0.0; Surface_CMz_Visc[iMarker_Monitoring] = 0.0;
16535 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
16542 if (Monitoring ==
YES) {
16543 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
16546 if (Marker_Tag == Monitoring_Tag)
16555 CD_Visc[iMarker] = 0.0; CL_Visc[iMarker] = 0.0; CSF_Visc[iMarker] = 0.0;
16556 CFx_Visc[iMarker] = 0.0; CFy_Visc[iMarker] = 0.0; CFz_Visc[iMarker] = 0.0;
16557 CMx_Visc[iMarker] = 0.0; CMy_Visc[iMarker] = 0.0; CMz_Visc[iMarker] = 0.0;
16558 CoPx_Visc[iMarker] = 0.0; CoPy_Visc[iMarker] = 0.0; CoPz_Visc[iMarker] = 0.0;
16559 CT_Visc[iMarker] = 0.0; CQ_Visc[iMarker] = 0.0; CMerit_Visc[iMarker] = 0.0;
16560 HF_Visc[iMarker] = 0.0; MaxHF_Visc[iMarker] = 0.0; CEff_Visc[iMarker] = 0.0;
16562 for (iDim = 0; iDim <
nDim; iDim++) ForceViscous[iDim] = 0.0;
16563 MomentViscous[0] = 0.0; MomentViscous[1] = 0.0; MomentViscous[2] = 0.0;
16564 MomentX_Force[0] = 0.0; MomentX_Force[1] = 0.0; MomentX_Force[2] = 0.0;
16565 MomentY_Force[0] = 0.0; MomentY_Force[1] = 0.0; MomentY_Force[2] = 0.0;
16566 MomentZ_Force[0] = 0.0; MomentZ_Force[1] = 0.0; MomentZ_Force[2] = 0.0;
16570 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
16576 Coord_Normal = geometry->
node[iPointNormal]->
GetCoord();
16580 for (iDim = 0; iDim <
nDim; iDim++) {
16581 for (jDim = 0 ; jDim <
nDim; jDim++) {
16590 Area = 0.0;
for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim]; Area = sqrt(Area);
16593 for (iDim = 0; iDim <
nDim; iDim++) {
16594 UnitNormal[iDim] = Normal[iDim]/Area;
16599 div_vel = 0.0;
for (iDim = 0; iDim <
nDim; iDim++) div_vel += Grad_Vel[iDim][iDim];
16601 for (iDim = 0; iDim <
nDim; iDim++) {
16602 for (jDim = 0 ; jDim <
nDim; jDim++) {
16603 Tau[iDim][jDim] = Viscosity*(Grad_Vel[jDim][iDim] + Grad_Vel[iDim][jDim]) -
TWO3*Viscosity*div_vel*delta[iDim][jDim];
16610 su2double den_aux, c_cr1=0.3, O_ik, O_jk;
16611 unsigned short kDim;
16616 for (iDim = 0 ; iDim <
nDim; iDim++)
16617 for (jDim = 0 ; jDim <
nDim; jDim++)
16618 den_aux += Grad_Vel[iDim][jDim] * Grad_Vel[iDim][jDim];
16619 den_aux = sqrt(max(den_aux,1E-10));
16623 for (iDim = 0 ; iDim <
nDim; iDim++){
16624 for (jDim = 0 ; jDim <
nDim; jDim++){
16625 for (kDim = 0 ; kDim <
nDim; kDim++){
16626 O_ik = (Grad_Vel[iDim][kDim] - Grad_Vel[kDim][iDim])/ den_aux;
16627 O_jk = (Grad_Vel[jDim][kDim] - Grad_Vel[kDim][jDim])/ den_aux;
16628 Tau[iDim][jDim] -= c_cr1 * (O_ik * Tau[jDim][kDim] + O_jk * Tau[iDim][kDim]);
16637 for (iDim = 0; iDim <
nDim; iDim++) {
16638 TauElem[iDim] = 0.0;
16639 for (jDim = 0; jDim <
nDim; jDim++) {
16640 TauElem[iDim] += Tau[iDim][jDim]*UnitNormal[jDim];
16646 TauNormal = 0.0;
for (iDim = 0; iDim <
nDim; iDim++) TauNormal += TauElem[iDim] * UnitNormal[iDim];
16648 WallShearStress = 0.0;
16649 for (iDim = 0; iDim <
nDim; iDim++) {
16650 TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim];
16651 CSkinFriction[iMarker][iDim][iVertex] = TauTangent[iDim] / (0.5*RefDensity*RefVel2);
16652 WallShearStress += TauTangent[iDim] * TauTangent[iDim];
16654 WallShearStress = sqrt(WallShearStress);
16656 for (iDim = 0; iDim <
nDim; iDim++) WallDist[iDim] = (Coord[iDim] - Coord_Normal[iDim]);
16657 WallDistMod = 0.0;
for (iDim = 0; iDim <
nDim; iDim++) WallDistMod += WallDist[iDim]*WallDist[iDim]; WallDistMod = sqrt(WallDistMod);
16661 FrictionVel = sqrt(fabs(WallShearStress)/Density);
16662 YPlus[iMarker][iVertex] = WallDistMod*FrictionVel/(Viscosity/Density);
16666 GradTemperature = 0.0;
16667 for (iDim = 0; iDim <
nDim; iDim++)
16668 GradTemperature -= Grad_Temp[iDim]*UnitNormal[iDim];
16671 thermal_conductivity = Cp * Viscosity/Prandtl_Lam;
16672 HeatFlux[iMarker][iVertex] = -thermal_conductivity*GradTemperature;
16673 HF_Visc[iMarker] +=
HeatFlux[iMarker][iVertex]*Area;
16674 MaxHF_Visc[iMarker] += pow(
HeatFlux[iMarker][iVertex], MaxNorm);
16685 else AxiFactor = 1.0;
16689 for (iDim = 0; iDim <
nDim; iDim++) {
16690 Force[iDim] = TauElem[iDim] * Area * factor * AxiFactor;
16691 ForceViscous[iDim] += Force[iDim];
16692 MomentDist[iDim] = Coord[iDim] - Origin[iDim];
16698 MomentViscous[0] += (Force[2]*MomentDist[1] - Force[1]*MomentDist[2])/RefLength;
16699 MomentX_Force[1] += (-Force[1]*Coord[2]);
16700 MomentX_Force[2] += (Force[2]*Coord[1]);
16702 MomentViscous[1] += (Force[0]*MomentDist[2] - Force[2]*MomentDist[0])/RefLength;
16703 MomentY_Force[2] += (-Force[2]*Coord[0]);
16704 MomentY_Force[0] += (Force[0]*Coord[2]);
16706 MomentViscous[2] += (Force[1]*MomentDist[0] - Force[0]*MomentDist[1])/RefLength;
16707 MomentZ_Force[0] += (-Force[0]*Coord[1]);
16708 MomentZ_Force[1] += (Force[1]*Coord[0]);
16716 if (Monitoring ==
YES) {
16718 CD_Visc[iMarker] = ForceViscous[0]*cos(Alpha) + ForceViscous[1]*sin(Alpha);
16719 CL_Visc[iMarker] = -ForceViscous[0]*sin(Alpha) + ForceViscous[1]*cos(Alpha);
16720 CEff_Visc[iMarker] = CL_Visc[iMarker] / (CD_Visc[iMarker]+
EPS);
16721 CFx_Visc[iMarker] = ForceViscous[0];
16722 CFy_Visc[iMarker] = ForceViscous[1];
16723 CMz_Visc[iMarker] = MomentViscous[2];
16724 CoPx_Visc[iMarker] = MomentZ_Force[1];
16725 CoPy_Visc[iMarker] = -MomentZ_Force[0];
16726 CT_Visc[iMarker] = -CFx_Visc[iMarker];
16727 CQ_Visc[iMarker] = -CMz_Visc[iMarker];
16728 CMerit_Visc[iMarker] = CT_Visc[iMarker] / (CQ_Visc[iMarker]+
EPS);
16729 MaxHF_Visc[iMarker] = pow(MaxHF_Visc[iMarker], 1.0/MaxNorm);
16732 CD_Visc[iMarker] = ForceViscous[0]*cos(Alpha)*cos(Beta) + ForceViscous[1]*sin(Beta) + ForceViscous[2]*sin(Alpha)*cos(Beta);
16733 CL_Visc[iMarker] = -ForceViscous[0]*sin(Alpha) + ForceViscous[2]*cos(Alpha);
16734 CSF_Visc[iMarker] = -ForceViscous[0]*sin(Beta)*cos(Alpha) + ForceViscous[1]*cos(Beta) - ForceViscous[2]*sin(Beta)*sin(Alpha);
16735 CEff_Visc[iMarker] = CL_Visc[iMarker]/(CD_Visc[iMarker] +
EPS);
16736 CFx_Visc[iMarker] = ForceViscous[0];
16737 CFy_Visc[iMarker] = ForceViscous[1];
16738 CFz_Visc[iMarker] = ForceViscous[2];
16739 CMx_Visc[iMarker] = MomentViscous[0];
16740 CMy_Visc[iMarker] = MomentViscous[1];
16741 CMz_Visc[iMarker] = MomentViscous[2];
16742 CoPx_Visc[iMarker] = -MomentY_Force[0];
16743 CoPz_Visc[iMarker] = MomentY_Force[2];
16744 CT_Visc[iMarker] = -CFz_Visc[iMarker];
16745 CQ_Visc[iMarker] = -CMz_Visc[iMarker];
16746 CMerit_Visc[iMarker] = CT_Visc[iMarker] / (CQ_Visc[iMarker] +
EPS);
16747 MaxHF_Visc[iMarker] = pow(MaxHF_Visc[iMarker], 1.0/MaxNorm);
16750 AllBound_CD_Visc += CD_Visc[iMarker];
16751 AllBound_CL_Visc += CL_Visc[iMarker];
16752 AllBound_CSF_Visc += CSF_Visc[iMarker];
16753 AllBound_CFx_Visc += CFx_Visc[iMarker];
16754 AllBound_CFy_Visc += CFy_Visc[iMarker];
16755 AllBound_CFz_Visc += CFz_Visc[iMarker];
16756 AllBound_CMx_Visc += CMx_Visc[iMarker];
16757 AllBound_CMy_Visc += CMy_Visc[iMarker];
16758 AllBound_CMz_Visc += CMz_Visc[iMarker];
16759 AllBound_CoPx_Visc += CoPx_Visc[iMarker];
16760 AllBound_CoPy_Visc += CoPy_Visc[iMarker];
16761 AllBound_CoPz_Visc += CoPz_Visc[iMarker];
16762 AllBound_CT_Visc += CT_Visc[iMarker];
16763 AllBound_CQ_Visc += CQ_Visc[iMarker];
16764 AllBound_HF_Visc += HF_Visc[iMarker];
16765 AllBound_MaxHF_Visc += pow(MaxHF_Visc[iMarker], MaxNorm);
16769 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
16772 if (Marker_Tag == Monitoring_Tag) {
16773 Surface_CL_Visc[iMarker_Monitoring] += CL_Visc[iMarker];
16774 Surface_CD_Visc[iMarker_Monitoring] += CD_Visc[iMarker];
16775 Surface_CSF_Visc[iMarker_Monitoring] += CSF_Visc[iMarker];
16776 Surface_CEff_Visc[iMarker_Monitoring] += CEff_Visc[iMarker];
16777 Surface_CFx_Visc[iMarker_Monitoring] += CFx_Visc[iMarker];
16778 Surface_CFy_Visc[iMarker_Monitoring] += CFy_Visc[iMarker];
16779 Surface_CFz_Visc[iMarker_Monitoring] += CFz_Visc[iMarker];
16780 Surface_CMx_Visc[iMarker_Monitoring] += CMx_Visc[iMarker];
16781 Surface_CMy_Visc[iMarker_Monitoring] += CMy_Visc[iMarker];
16782 Surface_CMz_Visc[iMarker_Monitoring] += CMz_Visc[iMarker];
16795 AllBound_CEff_Visc = AllBound_CL_Visc / (AllBound_CD_Visc +
EPS);
16796 AllBound_CMerit_Visc = AllBound_CT_Visc / (AllBound_CQ_Visc +
EPS);
16797 AllBound_MaxHF_Visc = pow(AllBound_MaxHF_Visc, 1.0/MaxNorm);
16804 MyAllBound_CD_Visc = AllBound_CD_Visc; AllBound_CD_Visc = 0.0;
16805 MyAllBound_CL_Visc = AllBound_CL_Visc; AllBound_CL_Visc = 0.0;
16806 MyAllBound_CSF_Visc = AllBound_CSF_Visc; AllBound_CSF_Visc = 0.0;
16807 AllBound_CEff_Visc = 0.0;
16808 MyAllBound_CMx_Visc = AllBound_CMx_Visc; AllBound_CMx_Visc = 0.0;
16809 MyAllBound_CMy_Visc = AllBound_CMy_Visc; AllBound_CMy_Visc = 0.0;
16810 MyAllBound_CMz_Visc = AllBound_CMz_Visc; AllBound_CMz_Visc = 0.0;
16811 MyAllBound_CoPx_Visc = AllBound_CoPx_Visc; AllBound_CoPx_Visc = 0.0;
16812 MyAllBound_CoPy_Visc = AllBound_CoPy_Visc; AllBound_CoPy_Visc = 0.0;
16813 MyAllBound_CoPz_Visc = AllBound_CoPz_Visc; AllBound_CoPz_Visc = 0.0;
16814 MyAllBound_CFx_Visc = AllBound_CFx_Visc; AllBound_CFx_Visc = 0.0;
16815 MyAllBound_CFy_Visc = AllBound_CFy_Visc; AllBound_CFy_Visc = 0.0;
16816 MyAllBound_CFz_Visc = AllBound_CFz_Visc; AllBound_CFz_Visc = 0.0;
16817 MyAllBound_CT_Visc = AllBound_CT_Visc; AllBound_CT_Visc = 0.0;
16818 MyAllBound_CQ_Visc = AllBound_CQ_Visc; AllBound_CQ_Visc = 0.0;
16819 AllBound_CMerit_Visc = 0.0;
16820 MyAllBound_HF_Visc = AllBound_HF_Visc; AllBound_HF_Visc = 0.0;
16821 MyAllBound_MaxHF_Visc = pow(AllBound_MaxHF_Visc, MaxNorm); AllBound_MaxHF_Visc = 0.0;
16826 AllBound_CEff_Visc = AllBound_CL_Visc / (AllBound_CD_Visc +
EPS);
16838 AllBound_CMerit_Visc = AllBound_CT_Visc / (AllBound_CQ_Visc +
EPS);
16841 AllBound_MaxHF_Visc = pow(AllBound_MaxHF_Visc, 1.0/MaxNorm);
16858 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
16860 MySurface_CL_Visc[iMarker_Monitoring] = Surface_CL_Visc[iMarker_Monitoring];
16861 MySurface_CD_Visc[iMarker_Monitoring] = Surface_CD_Visc[iMarker_Monitoring];
16862 MySurface_CSF_Visc[iMarker_Monitoring] = Surface_CSF_Visc[iMarker_Monitoring];
16863 MySurface_CEff_Visc[iMarker_Monitoring] = Surface_CEff_Visc[iMarker_Monitoring];
16864 MySurface_CFx_Visc[iMarker_Monitoring] = Surface_CFx_Visc[iMarker_Monitoring];
16865 MySurface_CFy_Visc[iMarker_Monitoring] = Surface_CFy_Visc[iMarker_Monitoring];
16866 MySurface_CFz_Visc[iMarker_Monitoring] = Surface_CFz_Visc[iMarker_Monitoring];
16867 MySurface_CMx_Visc[iMarker_Monitoring] = Surface_CMx_Visc[iMarker_Monitoring];
16868 MySurface_CMy_Visc[iMarker_Monitoring] = Surface_CMy_Visc[iMarker_Monitoring];
16869 MySurface_CMz_Visc[iMarker_Monitoring] = Surface_CMz_Visc[iMarker_Monitoring];
16870 MySurface_HF_Visc[iMarker_Monitoring] =
Surface_HF_Visc[iMarker_Monitoring];
16873 Surface_CL_Visc[iMarker_Monitoring] = 0.0;
16874 Surface_CD_Visc[iMarker_Monitoring] = 0.0;
16875 Surface_CSF_Visc[iMarker_Monitoring] = 0.0;
16876 Surface_CEff_Visc[iMarker_Monitoring] = 0.0;
16877 Surface_CFx_Visc[iMarker_Monitoring] = 0.0;
16878 Surface_CFy_Visc[iMarker_Monitoring] = 0.0;
16879 Surface_CFz_Visc[iMarker_Monitoring] = 0.0;
16880 Surface_CMx_Visc[iMarker_Monitoring] = 0.0;
16881 Surface_CMy_Visc[iMarker_Monitoring] = 0.0;
16882 Surface_CMz_Visc[iMarker_Monitoring] = 0.0;
16890 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++)
16891 Surface_CEff_Visc[iMarker_Monitoring] = Surface_CL_Visc[iMarker_Monitoring] / (Surface_CD_Visc[iMarker_Monitoring] +
EPS);
16901 delete [] MySurface_CL_Visc;
delete [] MySurface_CD_Visc;
delete [] MySurface_CSF_Visc;
16902 delete [] MySurface_CEff_Visc;
delete [] MySurface_CFx_Visc;
delete [] MySurface_CFy_Visc;
16903 delete [] MySurface_CFz_Visc;
delete [] MySurface_CMx_Visc;
delete [] MySurface_CMy_Visc;
16904 delete [] MySurface_CMz_Visc;
delete [] MySurface_HF_Visc;
delete [] MySurface_MaxHF_Visc;
16931 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
16932 Surface_CL[iMarker_Monitoring] += Surface_CL_Visc[iMarker_Monitoring];
16933 Surface_CD[iMarker_Monitoring] += Surface_CD_Visc[iMarker_Monitoring];
16934 Surface_CSF[iMarker_Monitoring] += Surface_CSF_Visc[iMarker_Monitoring];
16936 Surface_CFx[iMarker_Monitoring] += Surface_CFx_Visc[iMarker_Monitoring];
16937 Surface_CFy[iMarker_Monitoring] += Surface_CFy_Visc[iMarker_Monitoring];
16938 Surface_CFz[iMarker_Monitoring] += Surface_CFz_Visc[iMarker_Monitoring];
16939 Surface_CMx[iMarker_Monitoring] += Surface_CMx_Visc[iMarker_Monitoring];
16940 Surface_CMy[iMarker_Monitoring] += Surface_CMy_Visc[iMarker_Monitoring];
16941 Surface_CMz[iMarker_Monitoring] += Surface_CMz_Visc[iMarker_Monitoring];
16949 unsigned short iDim, jDim, iVar, jVar, Wall_Function;
16950 unsigned long iVertex, iPoint, Point_Normal, total_index, mflux_ramp = 999;
16952 su2double Wall_HeatFlux, dist_ij, *Coord_i, *Coord_j, theta2;
16953 su2double thetax, thetay, thetaz, etax, etay, etaz, pix, piy, piz, factor;
16954 su2double ProjGridVel, *GridVel, GridVel2, *Normal, Area, Pressure = 0.0, Entropy;
16955 su2double total_viscosity, div_vel, Density, tau_vel[3] = {0.0, 0.0, 0.0}, UnitNormal[3] = {0.0, 0.0, 0.0}, Velocity[3] = {0.0, 0.0, 0.0};
16956 su2double laminar_viscosity = 0.0, eddy_viscosity = 0.0, Grad_Vel[3][3] = {{0.0,0.0,0.0},{0.0,0.0,0.0},{0.0,0.0,0.0}},
16957 tau[3][3] = {{0.0,0.0,0.0},{0.0,0.0,0.0},{0.0,0.0,0.0}};
16958 su2double delta[3][3] = {{1.0, 0.0, 0.0},{0.0,1.0,0.0},{0.0,0.0,1.0}};
16960 su2double Riemann, SoundSpeed2, Vel_Mag, Energy;
16978 Wall_HeatFlux = 0.0;
16986 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
17002 for (iDim = 0; iDim <
nDim; iDim++)
17003 Area += Normal[iDim]*Normal[iDim];
17004 Area = sqrt (Area);
17006 for (iDim = 0; iDim <
nDim; iDim++)
17007 UnitNormal[iDim] = -Normal[iDim]/Area;
17011 for (iVar = 0; iVar <
nVar; iVar++) {
17019 if (grid_movement) {
17021 for (iDim = 0; iDim <
nDim; iDim++)
Vector[iDim] = GridVel[iDim] - VelEps * UnitNormal[iDim];
17023 for (iDim = 0; iDim <
nDim; iDim++)
Vector[iDim] = -VelEps * UnitNormal[iDim];
17032 for (iDim = 0; iDim <
nDim; iDim++)
17046 total_viscosity = laminar_viscosity + eddy_viscosity;
17048 for (iDim = 0; iDim <
nDim; iDim++) {
17049 for (jDim = 0 ; jDim <
nDim; jDim++) {
17056 div_vel = 0.0;
for (iDim = 0 ; iDim <
nDim; iDim++) div_vel += Grad_Vel[iDim][iDim];
17060 for (iDim = 0; iDim <
nDim; iDim++) {
17061 for (jDim = 0; jDim <
nDim; jDim++) {
17062 tau[iDim][jDim] = total_viscosity*( Grad_Vel[jDim][iDim]+Grad_Vel[iDim][jDim] ) -
TWO3*total_viscosity*div_vel*delta[iDim][jDim];
17068 for (iDim = 0 ; iDim <
nDim; iDim++) {
17069 tau_vel[iDim] = 0.0;
17070 for (jDim = 0 ; jDim <
nDim; jDim++)
17071 tau_vel[iDim] += tau[iDim][jDim]*
Vector[jDim];
17076 for (iDim = 0 ; iDim <
nDim; iDim++){
17079 Res_Visc[
nDim+1] += tau_vel[iDim]*UnitNormal[iDim]*Area;
17178 for (iVar = 1; iVar <=
nDim; iVar++) {
17179 total_index = iPoint*
nVar+iVar;
17200 unsigned long iVertex, iPoint;
17201 unsigned short Boundary, Monitoring, iMarker, iMarker_Monitoring, iDim, jDim;
17204 su2double TauNormal, UnitNormal[3] = {0.0, 0.0, 0.0}, TauElem[3] = {0.0, 0.0, 0.0}, TauTangent[3] = {0.0, 0.0, 0.0},
17205 Tau[3][3] = {{0.0, 0.0, 0.0},{0.0, 0.0, 0.0},{0.0, 0.0, 0.0}}, Force[3] = {0.0, 0.0, 0.0}, Cp, thermal_conductivity, MaxNorm = 8.0,
17206 Grad_Vel[3][3] = {{0.0, 0.0, 0.0},{0.0, 0.0, 0.0},{0.0, 0.0, 0.0}}, Grad_Temp[3] = {0.0, 0.0, 0.0},
17207 delta[3][3] = {{1.0, 0.0, 0.0},{0.0,1.0,0.0},{0.0,0.0,1.0}};
17208 su2double VelMag_FS = 0.0, SkinFrictionMag = 0.0, SkinFrictionDot = 0.0, *Normal, Area, Sref = config->
GetRefArea();
17211 string Marker_Tag, Monitoring_Tag;
17213 for (iDim = 0; iDim <
nDim; iDim++){
17214 VelMag_FS += Vel_FS[iDim]*Vel_FS[iDim];
17216 VelMag_FS = sqrt(VelMag_FS);
17220 Total_Buffet_Metric = 0.0;
17222 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
17223 Surface_Buffet_Metric[iMarker_Monitoring] = 0.0;
17228 for (iMarker = 0; iMarker <
nMarker; iMarker++) {
17230 Buffet_Metric[iMarker] = 0.0;
17239 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
17250 for (iDim = 0; iDim <
nDim; iDim++) {
17251 for (jDim = 0 ; jDim <
nDim; jDim++) {
17259 Area = 0.0;
for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim]; Area = sqrt(Area);
17261 for (iDim = 0; iDim <
nDim; iDim++) {
17262 UnitNormal[iDim] = Normal[iDim]/Area;
17267 div_vel = 0.0;
for (iDim = 0; iDim <
nDim; iDim++) div_vel += Grad_Vel[iDim][iDim];
17269 for (iDim = 0; iDim <
nDim; iDim++) {
17270 for (jDim = 0 ; jDim <
nDim; jDim++) {
17271 Tau[iDim][jDim] = Viscosity*(Grad_Vel[jDim][iDim] + Grad_Vel[iDim][jDim]) -
TWO3*Viscosity*div_vel*delta[iDim][jDim];
17278 su2double den_aux, c_cr1=0.3, O_ik, O_jk;
17279 unsigned short kDim;
17284 for (iDim = 0 ; iDim <
nDim; iDim++)
17285 for (jDim = 0 ; jDim <
nDim; jDim++)
17286 den_aux += Grad_Vel[iDim][jDim] * Grad_Vel[iDim][jDim];
17287 den_aux = sqrt(max(den_aux,1E-10));
17291 for (iDim = 0 ; iDim <
nDim; iDim++){
17292 for (jDim = 0 ; jDim <
nDim; jDim++){
17293 for (kDim = 0 ; kDim <
nDim; kDim++){
17294 O_ik = (Grad_Vel[iDim][kDim] - Grad_Vel[kDim][iDim])/ den_aux;
17295 O_jk = (Grad_Vel[jDim][kDim] - Grad_Vel[kDim][jDim])/ den_aux;
17296 Tau[iDim][jDim] -= c_cr1 * (O_ik * Tau[jDim][kDim] + O_jk * Tau[iDim][kDim]);
17305 for (iDim = 0; iDim <
nDim; iDim++) {
17306 TauElem[iDim] = 0.0;
17307 for (jDim = 0; jDim <
nDim; jDim++) {
17308 TauElem[iDim] += Tau[iDim][jDim]*UnitNormal[jDim];
17314 TauNormal = 0.0;
for (iDim = 0; iDim <
nDim; iDim++) TauNormal += TauElem[iDim] * UnitNormal[iDim];
17316 for (iDim = 0; iDim <
nDim; iDim++) {
17317 TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim];
17322 SkinFrictionMag = 0.0;
17323 SkinFrictionDot = 0.0;
17324 for(iDim = 0; iDim <
nDim; iDim++){
17327 SkinFrictionMag += TauTangent[iDim]*TauTangent[iDim];
17328 SkinFrictionDot += TauTangent[iDim]*Vel_FS[iDim];
17330 SkinFrictionMag = sqrt(SkinFrictionMag);
17334 SkinFrictionDot /= SkinFrictionMag*VelMag_FS;
17338 Buffet_Sensor[iMarker][iVertex] = 1./(1. + exp(2.*k*(SkinFrictionDot + lam)));
17342 if(Monitoring ==
YES){
17349 Buffet_Metric[iMarker] += Buffet_Sensor[iMarker][iVertex]*Area/Sref;
17357 if(Monitoring ==
YES){
17359 Total_Buffet_Metric += Buffet_Metric[iMarker];
17363 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
17366 if (Marker_Tag == Monitoring_Tag) Surface_Buffet_Metric[iMarker_Monitoring] = Buffet_Metric[iMarker];
17379 su2double MyTotal_Buffet_Metric = Total_Buffet_Metric;
17380 Total_Buffet_Metric = 0.0;
17388 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
17390 MySurface_Buffet_Metric[iMarker_Monitoring] = Surface_Buffet_Metric[iMarker_Monitoring];
17391 Surface_Buffet_Metric[iMarker_Monitoring] = 0.0;
17397 delete [] MySurface_Buffet_Metric;
17405 unsigned short iMarker_Monitoring, Kind_ObjFunc;
17412 for (iMarker_Monitoring = 0; iMarker_Monitoring < config->
GetnMarker_Monitoring(); iMarker_Monitoring++) {
17417 switch(Kind_ObjFunc) {
17460 Total_ComboObj +=Weight_ObjFunc*Surface_Buffet_Metric[iMarker_Monitoring];
17478 switch(Kind_ObjFunc) {
17536 unsigned short iDim, jDim, iVar, jVar;
17537 unsigned long iVertex, iPoint, Point_Normal, total_index;
17539 su2double Wall_HeatFlux, dist_ij, *Coord_i, *Coord_j, theta2;
17540 su2double thetax, thetay, thetaz, etax, etay, etaz, pix, piy, piz, factor;
17541 su2double ProjGridVel, *GridVel, GridVel2, *Normal, Area, Pressure = 0.0;
17542 su2double total_viscosity, div_vel, Density, tau_vel[3] = {0.0, 0.0, 0.0}, UnitNormal[3] = {0.0, 0.0, 0.0};
17543 su2double laminar_viscosity = 0.0, eddy_viscosity = 0.0, Grad_Vel[3][3] = {{0.0,0.0,0.0},{0.0,0.0,0.0},{0.0,0.0,0.0}},
17544 tau[3][3] = {{0.0,0.0,0.0},{0.0,0.0,0.0},{0.0,0.0,0.0}};
17545 su2double delta[3][3] = {{1.0, 0.0, 0.0},{0.0,1.0,0.0},{0.0,0.0,1.0}};
17566 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
17582 for (iDim = 0; iDim <
nDim; iDim++)
17583 Area += Normal[iDim]*Normal[iDim];
17584 Area = sqrt (Area);
17586 for (iDim = 0; iDim <
nDim; iDim++)
17587 UnitNormal[iDim] = -Normal[iDim]/Area;
17591 for (iVar = 0; iVar <
nVar; iVar++) {
17599 if (grid_movement) {
17601 for (iDim = 0; iDim <
nDim; iDim++)
Vector[iDim] = GridVel[iDim];
17603 for (iDim = 0; iDim <
nDim; iDim++)
Vector[iDim] = 0.0;
17612 for (iDim = 0; iDim <
nDim; iDim++)
17624 if (grid_movement) {
17630 for (iDim = 0; iDim <
nDim; iDim++)
17631 ProjGridVel += GridVel[iDim]*UnitNormal[iDim]*Area;
17639 total_viscosity = laminar_viscosity + eddy_viscosity;
17641 for (iDim = 0; iDim <
nDim; iDim++) {
17642 for (jDim = 0 ; jDim <
nDim; jDim++) {
17649 div_vel = 0.0;
for (iDim = 0 ; iDim <
nDim; iDim++) div_vel += Grad_Vel[iDim][iDim];
17653 for (iDim = 0; iDim <
nDim; iDim++) {
17654 for (jDim = 0; jDim <
nDim; jDim++) {
17655 tau[iDim][jDim] = total_viscosity*( Grad_Vel[jDim][iDim]+Grad_Vel[iDim][jDim] ) -
TWO3*total_viscosity*div_vel*delta[iDim][jDim];
17661 for (iDim = 0 ; iDim <
nDim; iDim++) {
17662 tau_vel[iDim] = 0.0;
17663 for (jDim = 0 ; jDim <
nDim; jDim++)
17664 tau_vel[iDim] += tau[iDim][jDim]*GridVel[jDim];
17670 for (iDim = 0 ; iDim <
nDim; iDim++)
17671 Res_Visc[
nDim+1] += tau_vel[iDim]*UnitNormal[iDim]*Area;
17680 for (iDim = 0; iDim <
nDim; iDim++)
17681 GridVel2 += GridVel[iDim]*GridVel[iDim];
17682 for (iVar = 0; iVar <
nVar; iVar++)
17683 for (jVar = 0; jVar <
nVar; jVar++)
17686 for (jDim = 0; jDim <
nDim; jDim++)
17696 for (iVar = 0; iVar <
nVar; iVar++)
17697 for (jVar = 0; jVar <
nVar; jVar++)
17710 for (iDim = 0; iDim <
nDim; iDim++)
17711 dist_ij += (Coord_j[iDim]-Coord_i[iDim])*(Coord_j[iDim]-Coord_i[iDim]);
17712 dist_ij = sqrt(dist_ij);
17715 for (iDim = 0; iDim <
nDim; iDim++)
17716 theta2 += UnitNormal[iDim]*UnitNormal[iDim];
17718 factor = total_viscosity*Area/(Density*dist_ij);
17721 thetax = theta2 + UnitNormal[0]*UnitNormal[0]/3.0;
17722 thetay = theta2 + UnitNormal[1]*UnitNormal[1]/3.0;
17724 etaz = UnitNormal[0]*UnitNormal[1]/3.0;
17726 pix = GridVel[0]*thetax + GridVel[1]*etaz;
17727 piy = GridVel[0]*etaz + GridVel[1]*thetay;
17729 Jacobian_i[
nDim+1][0] -= factor*(-pix*GridVel[0]+piy*GridVel[1]);
17733 thetax = theta2 + UnitNormal[0]*UnitNormal[0]/3.0;
17734 thetay = theta2 + UnitNormal[1]*UnitNormal[1]/3.0;
17735 thetaz = theta2 + UnitNormal[2]*UnitNormal[2]/3.0;
17737 etaz = UnitNormal[0]*UnitNormal[1]/3.0;
17738 etax = UnitNormal[1]*UnitNormal[2]/3.0;
17739 etay = UnitNormal[0]*UnitNormal[2]/3.0;
17741 pix = GridVel[0]*thetax + GridVel[1]*etaz + GridVel[2]*etay;
17742 piy = GridVel[0]*etaz + GridVel[1]*thetay + GridVel[2]*etax;
17743 piz = GridVel[0]*etay + GridVel[1]*etax + GridVel[2]*thetaz;
17745 Jacobian_i[
nDim+1][0] -= factor*(-pix*GridVel[0]+piy*GridVel[1]+piz*GridVel[2]);
17770 for (iVar = 1; iVar <=
nDim; iVar++) {
17771 total_index = iPoint*
nVar+iVar;
17782 unsigned short iVar, jVar, iDim, jDim;
17783 unsigned long iVertex, iPoint, Point_Normal, total_index;
17785 su2double *Normal, *Coord_i, *Coord_j, Area, dist_ij, theta2;
17786 su2double Twall, dTdn, dTdrho, thermal_conductivity;
17787 su2double thetax, thetay, thetaz, etax, etay, etaz, pix, piy, piz, factor;
17788 su2double ProjGridVel, *GridVel, GridVel2, Pressure = 0.0, Density, Vel2;
17789 su2double total_viscosity, div_vel, tau_vel[3] = {0.0,0.0,0.0}, UnitNormal[3] = {0.0,0.0,0.0};
17790 su2double laminar_viscosity, eddy_viscosity, Grad_Vel[3][3] = {{1.0, 0.0, 0.0},{0.0,1.0,0.0},{0.0,0.0,1.0}},
17791 tau[3][3] = {{0.0, 0.0, 0.0},{0.0,0.0,0.0},{0.0,0.0,0.0}}, delta[3][3] = {{1.0, 0.0, 0.0},{0.0,1.0,0.0},{0.0,0.0,1.0}};
17817 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
17831 Area = 0.0;
for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim]; Area = sqrt (Area);
17833 for (iDim = 0; iDim <
nDim; iDim++)
17834 UnitNormal[iDim] = -Normal[iDim]/Area;
17839 for (iDim = 0; iDim <
nDim; iDim++)
17840 theta2 += UnitNormal[iDim]*UnitNormal[iDim];
17851 for (iDim = 0; iDim <
nDim; iDim++)
17852 dist_ij += (Coord_j[iDim]-Coord_i[iDim])*(Coord_j[iDim]-Coord_i[iDim]);
17853 dist_ij = sqrt(dist_ij);
17858 if (grid_movement) {
17860 for (iDim = 0; iDim <
nDim; iDim++)
Vector[iDim] = GridVel[iDim];
17863 for (iDim = 0; iDim <
nDim; iDim++)
Vector[iDim] = 0.0;
17868 for (iVar = 0; iVar <
nVar; iVar++) {
17877 for (iDim = 0; iDim <
nDim; iDim++)
17889 thermal_conductivity = Cp * ( laminar_viscosity/Prandtl_Lam + eddy_viscosity/Prandtl_Turb);
17899 Res_Visc[
nDim+1] = thermal_conductivity * dTdn * Area;
17905 for (iVar = 0; iVar <
nVar; iVar ++)
17906 for (jVar = 0; jVar <
nVar; jVar ++)
17913 for (iDim = 0; iDim <
nDim; iDim++)
17915 dTdrho = 1.0/Density * ( -Twall + (
Gamma-1.0)/Gas_Constant*(Vel2/2.0) );
17919 for (iVar = 1; iVar <=
nDim; iVar++) {
17920 total_index = iPoint*
nVar+iVar;
17926 Jacobian_i[
nDim+1][0] = -thermal_conductivity*theta2/dist_ij * dTdrho * Area;
17927 Jacobian_i[
nDim+1][
nDim+1] = -thermal_conductivity*theta2/dist_ij * (
Gamma-1.0)/(Gas_Constant*Density) * Area;
17938 if (grid_movement) {
17944 for (iDim = 0; iDim <
nDim; iDim++)
17945 ProjGridVel += GridVel[iDim]*UnitNormal[iDim]*Area;
17954 total_viscosity = laminar_viscosity + eddy_viscosity;
17956 for (iDim = 0; iDim <
nDim; iDim++) {
17957 for (jDim = 0 ; jDim <
nDim; jDim++) {
17964 div_vel = 0.0;
for (iDim = 0 ; iDim <
nDim; iDim++) div_vel += Grad_Vel[iDim][iDim];
17968 for (iDim = 0; iDim <
nDim; iDim++)
17969 for (jDim = 0; jDim <
nDim; jDim++) {
17970 tau[iDim][jDim] = total_viscosity*( Grad_Vel[jDim][iDim] + Grad_Vel[iDim][jDim] ) -
TWO3*total_viscosity*div_vel*delta[iDim][jDim];
17975 for (iDim = 0 ; iDim <
nDim; iDim++) {
17976 tau_vel[iDim] = 0.0;
17977 for (jDim = 0 ; jDim <
nDim; jDim++)
17978 tau_vel[iDim] += tau[iDim][jDim]*GridVel[jDim];
17984 for (iDim = 0 ; iDim <
nDim; iDim++)
17985 Res_Visc[
nDim+1] += tau_vel[iDim]*UnitNormal[iDim]*Area;
17994 for (iDim = 0; iDim <
nDim; iDim++)
17995 GridVel2 += GridVel[iDim]*GridVel[iDim];
17996 for (iVar = 0; iVar <
nVar; iVar++)
17997 for (jVar = 0; jVar <
nVar; jVar++)
18001 for (jDim = 0; jDim <
nDim; jDim++)
18011 for (iVar = 0; iVar <
nVar; iVar++)
18012 for (jVar = 0; jVar <
nVar; jVar++)
18015 factor = total_viscosity*Area/(Density*dist_ij);
18018 thetax = theta2 + UnitNormal[0]*UnitNormal[0]/3.0;
18019 thetay = theta2 + UnitNormal[1]*UnitNormal[1]/3.0;
18021 etaz = UnitNormal[0]*UnitNormal[1]/3.0;
18023 pix = GridVel[0]*thetax + GridVel[1]*etaz;
18024 piy = GridVel[0]*etaz + GridVel[1]*thetay;
18026 Jacobian_i[
nDim+1][0] -= factor*(-pix*GridVel[0]+piy*GridVel[1]);
18031 thetax = theta2 + UnitNormal[0]*UnitNormal[0]/3.0;
18032 thetay = theta2 + UnitNormal[1]*UnitNormal[1]/3.0;
18033 thetaz = theta2 + UnitNormal[2]*UnitNormal[2]/3.0;
18035 etaz = UnitNormal[0]*UnitNormal[1]/3.0;
18036 etax = UnitNormal[1]*UnitNormal[2]/3.0;
18037 etay = UnitNormal[0]*UnitNormal[2]/3.0;
18039 pix = GridVel[0]*thetax + GridVel[1]*etaz + GridVel[2]*etay;
18040 piy = GridVel[0]*etaz + GridVel[1]*thetay + GridVel[2]*etax;
18041 piz = GridVel[0]*etay + GridVel[1]*etax + GridVel[2]*thetaz;
18043 Jacobian_i[
nDim+1][0] -= factor*(-pix*GridVel[0]+piy*GridVel[1]+piz*GridVel[2]);
18068 for (iVar = 1; iVar <=
nDim; iVar++) {
18069 total_index = iPoint*
nVar+iVar;
18080 unsigned long iPoint;
18085 for (iPoint = 0; iPoint <
nPoint; iPoint++){
18087 if (kind_roe_dissipation ==
FD || kind_roe_dissipation ==
FD_DUCROS){
18096 }
else if (kind_roe_dissipation ==
NTS || kind_roe_dissipation ==
NTS_DUCROS) {
18107 unsigned short iVar, jVar, iDim, jDim;
18108 unsigned long iVertex, iPoint, Point_Normal, total_index;
18110 su2double *Normal, *Coord_i, *Coord_j, Area, dist_ij, theta2;
18111 su2double Twall, There, dTdn, dTdrho, thermal_conductivity, Tconjugate, HF_FactorHere, HF_FactorConjugate;
18112 su2double thetax, thetay, thetaz, etax, etay, etaz, pix, piy, piz, factor;
18113 su2double ProjGridVel, *GridVel, GridVel2, Pressure = 0.0, Density, Vel2;
18114 su2double total_viscosity, div_vel, tau_vel[3] = {0.0,0.0,0.0}, UnitNormal[3] = {0.0,0.0,0.0};
18115 su2double laminar_viscosity, eddy_viscosity, Grad_Vel[3][3] = {{1.0, 0.0, 0.0},{0.0,1.0,0.0},{0.0,0.0,1.0}},
18116 tau[3][3] = {{0.0, 0.0, 0.0},{0.0,0.0,0.0},{0.0,0.0,0.0}}, delta[3][3] = {{1.0, 0.0, 0.0},{0.0,1.0,0.0},{0.0,0.0,1.0}};
18139 for (iVertex = 0; iVertex < geometry->
nVertex[val_marker]; iVertex++) {
18149 Area = 0.0;
for (iDim = 0; iDim <
nDim; iDim++) Area += Normal[iDim]*Normal[iDim]; Area = sqrt (Area);
18151 for (iDim = 0; iDim <
nDim; iDim++)
18152 UnitNormal[iDim] = -Normal[iDim]/Area;
18157 for (iDim = 0; iDim <
nDim; iDim++)
18158 theta2 += UnitNormal[iDim]*UnitNormal[iDim];
18169 for (iDim = 0; iDim <
nDim; iDim++)
18170 dist_ij += (Coord_j[iDim]-Coord_i[iDim])*(Coord_j[iDim]-Coord_i[iDim]);
18171 dist_ij = sqrt(dist_ij);
18176 if (grid_movement) {
18178 for (iDim = 0; iDim <
nDim; iDim++)
Vector[iDim] = GridVel[iDim];
18181 for (iDim = 0; iDim <
nDim; iDim++)
Vector[iDim] = 0.0;
18186 for (iVar = 0; iVar <
nVar; iVar++) {
18195 for (iDim = 0; iDim <
nDim; iDim++)
18203 thermal_conductivity = Cp * ( laminar_viscosity/Prandtl_Lam + eddy_viscosity/Prandtl_Turb);
18218 Twall = (There*HF_FactorHere + Tconjugate*HF_FactorConjugate)/(HF_FactorHere + HF_FactorConjugate);
18228 Res_Visc[
nDim+1] = thermal_conductivity * dTdn * Area;
18234 for (iVar = 0; iVar <
nVar; iVar ++)
18235 for (jVar = 0; jVar <
nVar; jVar ++)
18242 for (iDim = 0; iDim <
nDim; iDim++)
18244 dTdrho = 1.0/Density * ( -Twall + (
Gamma-1.0)/Gas_Constant*(Vel2/2.0) );
18248 for (iVar = 1; iVar <=
nDim; iVar++) {
18249 total_index = iPoint*
nVar+iVar;
18255 Jacobian_i[
nDim+1][0] = -thermal_conductivity*theta2/dist_ij * dTdrho * Area;
18256 Jacobian_i[
nDim+1][
nDim+1] = -thermal_conductivity*theta2/dist_ij * (
Gamma-1.0)/(Gas_Constant*Density) * Area;
18267 if (grid_movement) {
18273 for (iDim = 0; iDim <
nDim; iDim++)
18274 ProjGridVel += GridVel[iDim]*UnitNormal[iDim]*Area;
18283 total_viscosity = laminar_viscosity + eddy_viscosity;
18285 for (iDim = 0; iDim <
nDim; iDim++) {
18286 for (jDim = 0 ; jDim <
nDim; jDim++) {
18293 div_vel = 0.0;
for (iDim = 0 ; iDim <
nDim; iDim++) div_vel += Grad_Vel[iDim][iDim];
18297 for (iDim = 0; iDim <
nDim; iDim++)
18298 for (jDim = 0; jDim <
nDim; jDim++) {
18299 tau[iDim][jDim] = total_viscosity*( Grad_Vel[jDim][iDim] + Grad_Vel[iDim][jDim] ) -
TWO3*total_viscosity*div_vel*delta[iDim][jDim];
18304 for (iDim = 0 ; iDim <
nDim; iDim++) {
18305 tau_vel[iDim] = 0.0;
18306 for (jDim = 0 ; jDim <
nDim; jDim++)
18307 tau_vel[iDim] += tau[iDim][jDim]*GridVel[jDim];
18313 for (iDim = 0 ; iDim <
nDim; iDim++)
18314 Res_Visc[
nDim+1] += tau_vel[iDim]*UnitNormal[iDim]*Area;
18323 for (iDim = 0; iDim <
nDim; iDim++)
18324 GridVel2 += GridVel[iDim]*GridVel[iDim];
18325 for (iVar = 0; iVar <
nVar; iVar++)
18326 for (jVar = 0; jVar <
nVar; jVar++)
18330 for (jDim = 0; jDim <
nDim; jDim++)
18340 for (iVar = 0; iVar <
nVar; iVar++)
18341 for (jVar = 0; jVar <
nVar; jVar++)
18344 factor = total_viscosity*Area/(Density*dist_ij);
18347 thetax = theta2 + UnitNormal[0]*UnitNormal[0]/3.0;
18348 thetay = theta2 + UnitNormal[1]*UnitNormal[1]/3.0;
18350 etaz = UnitNormal[0]*UnitNormal[1]/3.0;
18352 pix = GridVel[0]*thetax + GridVel[1]*etaz;
18353 piy = GridVel[0]*etaz + GridVel[1]*thetay;
18355 Jacobian_i[
nDim+1][0] -= factor*(-pix*GridVel[0]+piy*GridVel[1]);
18360 thetax = theta2 + UnitNormal[0]*UnitNormal[0]/3.0;
18361 thetay = theta2 + UnitNormal[1]*UnitNormal[1]/3.0;
18362 thetaz = theta2 + UnitNormal[2]*UnitNormal[2]/3.0;
18364 etaz = UnitNormal[0]*UnitNormal[1]/3.0;
18365 etax = UnitNormal[1]*UnitNormal[2]/3.0;
18366 etay = UnitNormal[0]*UnitNormal[2]/3.0;
18368 pix = GridVel[0]*thetax + GridVel[1]*etaz + GridVel[2]*etay;
18369 piy = GridVel[0]*etaz + GridVel[1]*thetay + GridVel[2]*etax;
18370 piz = GridVel[0]*etay + GridVel[1]*etax + GridVel[2]*thetaz;
18372 Jacobian_i[
nDim+1][0] -= factor*(-pix*GridVel[0]+piy*GridVel[1]+piz*GridVel[2]);
18397 for (iVar = 1; iVar <=
nDim; iVar++) {
18398 total_index = iPoint*
nVar+iVar;
18409 unsigned short iDim, jDim, iMarker;
18410 unsigned long iVertex, iPoint, Point_Normal, counter;
18412 su2double Area, div_vel, UnitNormal[3], *Normal;
18415 su2double Vel[3], VelNormal, VelTang[3], VelTangMod, VelInfMod, WallDist[3], WallDistMod;
18417 su2double Density_Wall, T_Wall, P_Wall, Lam_Visc_Wall, Tau_Wall = 0.0, Tau_Wall_Old = 0.0;
18420 su2double U_Tau, U_Plus, Gam, Beta, Phi, Q, Y_Plus_White, Y_Plus;
18421 su2double TauElem[3], TauNormal, TauTangent[3], WallShearStress;
18425 unsigned short max_iter = 10;
18432 for (iDim = 0; iDim <
nDim; iDim++)
18433 VelInfMod += VelInf[iDim];
18434 VelInfMod = sqrt(VelInfMod);
18445 for (iMarker = 0; iMarker < config->
GetnMarker_All(); iMarker++) {
18460 for (iVertex = 0; iVertex < geometry->
nVertex[iMarker]; iVertex++) {
18473 Coord_Normal = geometry->
node[Point_Normal]->
GetCoord();
18480 for (iDim = 0; iDim <
nDim; iDim++)
18481 Area += Normal[iDim]*Normal[iDim];
18482 Area = sqrt (Area);
18484 for (iDim = 0; iDim <
nDim; iDim++)
18485 UnitNormal[iDim] = -Normal[iDim]/Area;
18490 for (iDim = 0; iDim <
nDim; iDim++)
18491 Vel[iDim] =
node[Point_Normal]->GetVelocity(iDim);
18498 for (iDim = 0; iDim <
nDim; iDim++)
18499 VelNormal += Vel[iDim] * UnitNormal[iDim];
18500 for (iDim = 0; iDim <
nDim; iDim++)
18501 VelTang[iDim] = Vel[iDim] - VelNormal*UnitNormal[iDim];
18504 for (iDim = 0; iDim <
nDim; iDim++)
18505 VelTangMod += VelTang[iDim]*VelTang[iDim];
18506 VelTangMod = sqrt(VelTangMod);
18510 for (iDim = 0; iDim <
nDim; iDim++)
18511 WallDist[iDim] = (Coord[iDim] - Coord_Normal[iDim]);
18514 for (iDim = 0; iDim <
nDim; iDim++)
18515 WallDistMod += WallDist[iDim]*WallDist[iDim];
18516 WallDistMod = sqrt(WallDistMod);
18525 T_Wall = T_Normal + Recovery*pow(VelTangMod,2.0)/(2.0*Cp);
18531 Density_Wall = P_Wall/(Gas_Constant*T_Wall);
18540 for (iDim = 0; iDim <
nDim; iDim++)
18541 div_vel += grad_primvar[iDim+1][iDim];
18543 for (iDim = 0; iDim <
nDim; iDim++) {
18544 for (jDim = 0 ; jDim <
nDim; jDim++) {
18545 Delta = 0.0;
if (iDim == jDim) Delta = 1.0;
18546 tau[iDim][jDim] = Lam_Visc_Wall*( grad_primvar[jDim+1][iDim]
18547 + grad_primvar[iDim+1][jDim]) -
18548 TWO3*Lam_Visc_Wall*div_vel*Delta;
18550 TauElem[iDim] = 0.0;
18551 for (jDim = 0; jDim <
nDim; jDim++)
18552 TauElem[iDim] += tau[iDim][jDim]*UnitNormal[jDim];
18559 for (iDim = 0; iDim <
nDim; iDim++)
18560 TauNormal += TauElem[iDim] * UnitNormal[iDim];
18562 for (iDim = 0; iDim <
nDim; iDim++)
18563 TauTangent[iDim] = TauElem[iDim] - TauNormal * UnitNormal[iDim];
18565 WallShearStress = 0.0;
18566 for (iDim = 0; iDim <
nDim; iDim++)
18567 WallShearStress += TauTangent[iDim]*TauTangent[iDim];
18568 WallShearStress = sqrt(WallShearStress);
18574 Tau_Wall_Old = WallShearStress;
18575 counter = 0; diff = 1.0;
18577 while (diff > tol) {
18581 U_Tau = sqrt(Tau_Wall_Old/Density_Wall);
18582 U_Plus = VelTangMod/U_Tau;
18586 Gam = Recovery*U_Tau*U_Tau/(2.0*Cp*T_Wall);
18588 Q = sqrt(Beta*Beta + 4.0*Gam);
18589 Phi = asin(-1.0*Beta/Q);
18593 Y_Plus_White = exp((kappa/sqrt(Gam))*(asin((2.0*Gam*U_Plus - Beta)/Q) - Phi))*exp(-1.0*kappa*
B);
18598 Y_Plus = U_Plus + Y_Plus_White - (exp(-1.0*kappa*
B)*
18599 (1.0 + kappa*U_Plus + kappa*kappa*U_Plus*U_Plus/2.0 +
18600 kappa*kappa*kappa*U_Plus*U_Plus*U_Plus/6.0));
18606 Tau_Wall = (1.0/Density_Wall)*pow(Y_Plus*Lam_Visc_Wall/WallDistMod,2.0);
18610 diff = fabs(Tau_Wall-Tau_Wall_Old);
18611 Tau_Wall_Old += 0.25*(Tau_Wall-Tau_Wall_Old);
18614 if (counter > max_iter) {
18615 cout <<
"WARNING: Tau_Wall evaluation has not converged in solver_direct_mean.cpp" << endl;
18616 cout << Tau_Wall_Old <<
" " << Tau_Wall <<
" " << diff << endl;
static void Error(std::string ErrorMsg, std::string FunctionName)
static void Barrier(Comm comm)
static void Recv(void *buf, int count, Datatype datatype, int dest, int tag, Comm comm, Status *status)
static void Gather(void *sendbuf, int sendcnt, Datatype sendtype, void *recvbuf, int recvcnt, Datatype recvtype, int root, Comm comm)
static void Allreduce(void *sendbuf, void *recvbuf, int count, Datatype datatype, Op op, Comm comm)
static void Reduce(void *sendbuf, void *recvbuf, int count, Datatype datatype, Op op, int root, Comm comm)
static void Bsend(void *buf, int count, Datatype datatype, int dest, int tag, Comm comm)
static void Bcast(void *buf, int count, Datatype datatype, int root, Comm comm)
static void Sendrecv(void *sendbuf, int sendcnt, Datatype sendtype, int dest, int sendtag, void *recvbuf, int recvcnt, Datatype recvtype, int source, int recvtag, Comm comm, Status *status)
Main class for defining the problem; basically this class reads the configuration file,...
su2double GetTemperature_FreeStreamND(void)
Get the value of the non-dimensionalized freestream temperature.
su2double GetRelaxation_Factor_Flow(void)
Get the relaxation coefficient of the linear solver for the implicit formulation.
string GetMarker_ActDiskInlet_TagBound(unsigned short val_marker)
Get the index of the surface defined in the geometry file.
void SetDensity_FreeStream(su2double val_density_freestream)
Set the Froude number for free surface problems.
su2double GetMu_Temperature_Ref(void)
Get the value of the reference temperature for Sutherland model.
void SetActDisk_TotalTempRatio(unsigned short val_imarker, su2double val_actdisk_tempratio)
Get the back pressure (static) at an outlet boundary.
string GetMarker_ActDiskOutlet_TagBound(unsigned short val_marker)
Get the index of the surface defined in the geometry file.
su2double GetExhaust_TotalPressure(string val_marker)
Get the total pressure at an engine exhaust boundary.
void SetModVel_FreeStreamND(su2double val_modvel_freestreamnd)
Set the Froude number for free surface problems.
void SetInflow_Force(unsigned short val_imarker, su2double val_fanface_force)
Set the force balance at an engine inflow boundary.
su2double GetLength_Reynolds(void)
Get the value of the Reynolds length.
su2double GetTime_Ref(void)
Get the value of the reference time for non-dimensionalization.
bool GetSpatialFourier(void)
Verify if there is mixing plane interface specified from config file.
su2double GetRiemann_Var2(string val_marker)
Get the var 2 at Riemann boundary.
void SetActDisk_Mach(unsigned short val_imarker, su2double val_actdisk_mach)
Get the back pressure (static) at an outlet boundary.
bool GetBoolGiles(void)
Verify if there is any Giles Boundary Condition option specified from config file.
void SetForce_Ref(su2double val_force_ref)
Set the Froude number for free surface problems.
su2double GetMu_Constant(void)
Get the value of the constant viscosity.
su2double GetPressure_Critical(void)
Get the value of the critical pressure.
void SetVelocity_FreeStreamND(su2double val_velocity_freestreamnd, unsigned short val_dim)
Set the Froude number for free surface problems.
long GetUnst_AdjointIter(void)
Get the starting direct iteration number for the unsteady adjoint (reverse time integration).
su2double GetExhaust_Pressure(string val_marker)
Get the back pressure (static) at an engine exhaust boundary.
unsigned short GetKind_Solver(void)
Governing equations of the flow (it can be different from the run time equation).
void SetCFL(unsigned short val_mesh, su2double val_cfl)
Get the Courant Friedrich Levi number for each grid.
su2double GetInflow_Force(string val_marker)
Get the force balance at an engine inflow boundary.
void SetExhaust_MassFlow(unsigned short val_imarker, su2double val_exhaust_massflow)
Set the back pressure (static) at an engine exhaust boundary.
su2double GetEnergy_FreeStreamND(void)
Get the value of the non-dimensionalized freestream energy.
su2double * GetRefOriginMoment(unsigned short val_marker)
Get reference origin for moment computation.
unsigned short GetActDisk_Jump(void)
Get the format of the output solution.
void SetActDiskInlet_TotalPressure(unsigned short val_imarker, su2double val_actdisk_totalpressure)
Get the back pressure (static) at an outlet boundary.
unsigned long GetUpdate_BCThrust(void)
Get the value of iterations to re-evaluate the angle of attack.
unsigned short GetKind_Centered_Flow(void)
Get the kind of center convective numerical scheme for the flow equations.
su2double * GetVelocity_FreeStreamND(void)
Get the vector of the non-dimensionalized freestream velocity.
su2double GetWall_HeatFlux(string val_index)
Get the wall heat flux on a constant heat flux boundary.
void SetMu_RefND(su2double mu_ref)
Set the value of the non-dimensional reference viscosity for Sutherland model.
unsigned long GetnExtIter(void)
Get the number of external iterations.
unsigned long GetWrt_Con_Freq(void)
Get the frequency for writing the convergence file.
su2double GetSurface_MassFlow(unsigned short val_imarker)
Get the massflow at an outlet boundary.
void SetMu_Temperature_RefND(su2double mu_Tref)
Set the value of the non-dimensional reference temperature for Sutherland model.
void SetActDiskOutlet_Pressure(unsigned short val_imarker, su2double val_actdisk_pressure)
Get the back pressure (static) at an outlet boundary.
unsigned short GetDirectDiff()
Get the direct differentation method.
su2double GetConductivity_Ref(void)
Get the value of the reference conductivity for non-dimensionalization.
su2double GetActDisk_TempJump(string val_marker, unsigned short val_index)
Get the thrust corffient of the actuator disk.
su2double GetUnst_CFL(void)
Get the Courant Friedrich Levi number for unsteady simulations.
su2double GetEnergy_Ref(void)
Get the value of the reference pressure for non-dimensionalization.
void SetWrt_Con_Freq(unsigned long val_freq)
Set the frequency for writing the convergence file.
void SetActDiskOutlet_GrossThrust(unsigned short val_imarker, su2double val_actdisk_grossthrust)
Get the back pressure (static) at an outlet boundary.
void SetVelocity_Ref(su2double val_velocity_ref)
Set the Froude number for free surface problems.
bool GetRestart_Flow(void)
For some problems like adjoint or the linearized equations it is necessary to restart the flow soluti...
unsigned short GetKind_FreeStreamOption(void)
free stream option to initialize the solution
su2double GetActDiskInlet_Pressure(string val_marker)
Get the back pressure (static) at an outlet boundary.
su2double GetMu_SND(void)
Get the value of the non-dimensional reference S for Sutherland model.
unsigned short GetKind_TimeIntScheme_Flow(void)
Get the kind of integration scheme (explicit or implicit) for the flow equations.
void SetExhaust_TotalPressure(unsigned short val_imarker, su2double val_exhaust_totalpressure)
Set the back pressure (total) at an engine exhaust boundary.
unsigned short GetKind_ConductivityModel(void)
Get the value of the thermal conductivity model.
su2double * GetInlet_FlowDir(string val_index)
Get the flow direction unit vector at an inlet boundary.
void SetInflow_Power(unsigned short val_imarker, su2double val_fanface_power)
Set the power at an engine inflow boundary.
su2double GetConst_DES(void)
Get the DES Constant.
void SetInflow_Pressure(unsigned short val_imarker, su2double val_fanface_pressure)
Set the fan face static pressure at an engine inflow boundary.
su2double GetGiles_Var2(string val_marker)
Get the var 2 for the Giles boundary.
unsigned short GetKind_SlopeLimit_Flow(void)
Get the method for limiting the spatial gradients.
su2double GetdCD_dCL(void)
Value of the weight of the CD, CL, CM optimization.
void SetActDiskInlet_Pressure(unsigned short val_imarker, su2double val_actdisk_pressure)
Get the back pressure (static) at an outlet boundary.
su2double GetInitial_BCThrust(void)
Get the value of the non-dimensionalized actuator disk turbulence intensity.
su2double GetEngine_Power(unsigned short val_imarker)
Get the back pressure (static) at an outlet boundary.
string GetMarker_EngineExhaust_TagBound(unsigned short val_marker)
Get the index of the surface defined in the geometry file.
su2double GetdCMy_dCL(void)
Value of the weight of the CD, CL, CM optimization.
bool GetContinuous_Adjoint(void)
Determines if problem is adjoint.
unsigned short GetKind_Data_Giles(string val_marker)
Get Kind Data for the Giles BC.
unsigned short GetMarker_All_Turbomachinery(unsigned short val_marker)
Get the Turbomachinery information for a marker val_marker.
unsigned short GetnSpanWiseSections(void)
number span-wise sections to compute 3D BC and performance for turbomachinery.
su2double GetExhaust_Temperature(string val_marker)
Get the temperature (static) at an engine exhaust boundary.
su2double GetAeroelastic_Frequency_Pitch(void)
Uncoupled Aeroelastic Frequency Pitch.
unsigned short GetKind_ObjFunc(void)
Get the kind of objective function. There are several options: Drag coefficient, Lift coefficient,...
unsigned short GetKind_Data_Riemann(string val_marker)
Get Kind Data of Riemann boundary.
unsigned short GetKind_HybridRANSLES(void)
Get the Kind of Hybrid RANS/LES.
su2double GetActDiskOutlet_Power(string val_marker)
Get the back pressure (static) at an outlet boundary.
bool GetViscous(void)
Determines if problem is viscous.
su2double GetViscosity_FreeStreamND(void)
Get the value of the non-dimensionalized freestream viscosity.
su2double GetInlet_Ptotal(string val_index)
Get the total pressure at an inlet boundary.
su2double GetPrandtl_Turb(void)
Get the value of the turbulent Prandtl number.
su2double GetOutlet_Pressure(string val_index)
Get the back pressure (static) at an outlet boundary.
unsigned short GetnMarker_All(void)
Get the total number of boundary markers.
unsigned short GetMarker_CfgFile_EngineExhaust(string val_marker)
Get Actuator Disk Outlet for boundary val_marker (actuator disk inlet).
void SetAoA(su2double val_AoA)
Set the angle of attack.
unsigned long GetIter_dCL_dAlpha(void)
Number of iterations to evaluate dCL_dAlpha.
bool GetUpdate_BCThrust_Bool(void)
Get information about whether to update the AoA for fixed lift mode.
void SetActDisk_DeltaPress(unsigned short val_imarker, su2double val_actdisk_deltapress)
Get the back pressure (static) at an outlet boundary.
void SetActDiskOutlet_Temperature(unsigned short val_imarker, su2double val_actdisk_temp)
Get the back pressure (static) at an outlet boundary.
void SetActDiskOutlet_TotalTemperature(unsigned short val_imarker, su2double val_actdisk_totaltemp)
Get the back pressure (static) at an outlet boundary.
unsigned short GetMarker_CfgFile_ActDiskOutlet(string val_marker)
Get Actuator Disk Outlet for boundary val_marker (actuator disk inlet).
unsigned short GetKind_ConvNumScheme_Flow(void)
Get the kind of convective numerical scheme for the flow equations (centered or upwind).
unsigned long GetIter_Fixed_CL(void)
Get the value of iterations to re-evaluate the angle of attack.
bool GetRead_Binary_Restart(void)
Flag for whether binary SU2 native restart files are read.
su2double GetSecondaryFlow_ActDisk(void)
Get the value of the non-dimensionalized actuator disk turbulence intensity.
su2double GetInflow_TotalTemperature(string val_marker)
Get the total temperature at an engine inflow boundary.
su2double GetPressure_Ref(void)
Get the value of the reference pressure for non-dimensionalization.
su2double * GetPeriodicRotation(unsigned short val_index)
Get the rotation angles for a periodic transformation.
void SetTime_Ref(su2double val_time_ref)
Set the Froude number for free surface problems.
unsigned short GetKind_AverageProcess(void)
Get the kind of mixing process for averaging quantities at the boundaries.
void SetEngine_Mach(unsigned short val_imarker, su2double val_engine_mach)
Set the back pressure (static) at an outlet boundary.
unsigned short GetKind_ConvNumScheme_AdjFlow(void)
Get the kind of convective numerical scheme for the adjoint flow equations (centered or upwind).
su2double GetActDisk_StaticTempRatio(unsigned short val_marker)
Get the back pressure (static) at an outlet boundary.
void SetActDiskOutlet_Power(unsigned short val_imarker, su2double val_actdisk_power)
Get the back pressure (static) at an outlet boundary.
unsigned short GetKind_Turb_Model(void)
Get the kind of the turbulence model.
void SetViscosity_Ref(su2double val_viscosity_ref)
Set the Froude number for free surface problems.
su2double GetDelta_UnstTimeND(void)
If we are prforming an unsteady simulation, there is only one value of the time step for the complete...
void SetActDiskInlet_Temperature(unsigned short val_imarker, su2double val_actdisk_temp)
Get the back pressure (static) at an outlet boundary.
su2double GetAoS(void)
Get the angle of sideslip of the body. It relates to the rotation of the aircraft centerline from the...
su2double GetExhaust_TotalTemperature(string val_marker)
Get the total temperature at an engine exhaust boundary.
su2double GetActDiskOutlet_MassFlow(string val_marker)
Get the back pressure (static) at an outlet boundary.
void SetNonphysical_Points(unsigned long val_nonphys_points)
Set the current number of non-physical nodes in the solution.
su2double GetReynolds(void)
Get the Reynolds number. Dimensionless number that gives a measure of the ratio of inertial forces to...
su2double GetInflow_TotalPressure(string val_marker)
Get the total pressure at an engine inflow boundary.
su2double GetMixedout_Coeff(unsigned short iCoeff)
Get mixedout coefficients.
bool GetFrozen_Limiter_Disc(void)
Provides information about the way in which the limiter will be treated by the disc....
unsigned short GetUnsteady_Simulation(void)
Provides information about the time integration, and change the write in the output files information...
su2double GetExtraRelFacGiles(unsigned short iCoeff)
Get extra relaxation factor coefficients for the Giels BC.
su2double GetTemperature_Critical(void)
Get the value of the critical temperature.
void SetMu_ConstantND(su2double mu_const)
Set the value of the non-dimensional constant viscosity.
bool Low_Mach_Preconditioning(void)
Get information about the Low Mach Preconditioning.
su2double GetDamp_Engine_Inflow(void)
Value of the damping factor for the engine inlet bc.
su2double GetActDiskInlet_Temperature(string val_marker)
Get the back pressure (static) at an outlet boundary.
void SetTotal_UnstTimeND(su2double val_total_unsttimend)
Set the Froude number for free surface problems.
su2double GetSurface_Mach(unsigned short val_imarker)
Get the mach number at an outlet boundary.
su2double GetActDisk_Area(string val_marker)
Get the tip radius of th actuator disk.
unsigned short GetnMarker_ActDiskInlet(void)
Get the total number of boundary markers.
su2double GetBuffet_lambda(void)
Get the buffet sensor offset parameter.
void SetOmega_Ref(su2double val_omega_ref)
Set the Froude number for free surface problems.
unsigned long GetUpdate_Alpha(void)
Get the value of iterations to re-evaluate the angle of attack.
su2double GetKt_Constant(void)
Get the value of the thermal conductivity.
su2double GetHighlite_Area(void)
Get the value of the reference viscosity for non-dimensionalization.
unsigned short GetKind_Linear_Solver(void)
Get the kind of solver for the implicit solver.
su2double GetSurface_SecondaryStrength(unsigned short val_imarker)
Get the secondary flow strength at the surface.
void SetOmega_FreeStream(su2double val_omega_freestream)
Set the Froude number for free surface problems.
su2double GetModVel_FreeStreamND(void)
Get the value of the frestream temperature.
unsigned short GetnMarker_Transpiration(void)
Get the total number of transpiration markers.
su2double GetActDisk_BCThrust_Old(string val_marker)
Get the origin of the actuator disk.
void SetModVel_FreeStream(su2double val_modvel_freestream)
Set the Froude number for free surface problems.
void SetActDisk_StaticPressRatio(unsigned short val_imarker, su2double val_actdisk_pressratio)
Get the back pressure (static) at an outlet boundary.
su2double GetdCMx_dCL(void)
Value of the weight of the CD, CL, CM optimization.
void SetEnergy_Ref(su2double val_energy_ref)
Set the Froude number for free surface problems.
su2double GetInflow_Power(string val_marker)
Get the power at an engine inflow boundary.
su2double * GetSubsonicEngine_Values(void)
Get the the coordinates where of the box where a subsonic region is imposed.
bool GetQCR(void)
Get QCR (SA-QCR2000).
void SetActDiskInlet_Power(unsigned short val_imarker, su2double val_actdisk_power)
Get the back pressure (static) at an outlet boundary.
unsigned short GetMarker_All_KindBC(unsigned short val_marker)
Get the kind of boundary for each marker.
su2double GetOmega_FreeStream(void)
Get the value of the non-dimensionalized freestream viscosity.
su2double GetExhaust_GrossThrust(string val_marker)
Get the gross thrust at an engine exhaust boundary.
void SetGas_Constant_Ref(su2double val_gas_constant_ref)
Set the Froude number for free surface problems.
su2double GetPressure_FreeStreamND(void)
Get the value of the non-dimensionalized freestream pressure.
su2double GetCFL(unsigned short val_mesh)
Get the Courant Friedrich Levi number for each grid.
bool GetRotating_Frame(void)
Get information about the rotational frame.
string GetMarker_Monitoring_TagBound(unsigned short val_marker)
Get the name of the surface defined in the geometry file.
unsigned short GetMarker_All_PyCustom(unsigned short val_marker)
Get the Python customization for a marker val_marker.
su2double * GetInlet_Velocity(string val_index)
Get the velocity vector at a supersonic inlet boundary.
void SetTemperature_FreeStream(su2double val_temperature_freestream)
Set the Froude number for free surface problems.
bool GetAeroelastic_Simulation(void)
Get information about the aeroelastic simulation.
bool Low_Mach_Correction(void)
Get information about the Low Mach Correction.
su2double GetGamma(void)
Get the value of the Gamma of fluid (ratio of specific heats).
unsigned short GetnSpanMaxAllZones(void)
number span-wise sections to compute performance for turbomachinery.
su2double GetActDiskOutlet_Force(string val_marker)
Get the back pressure (static) at an outlet boundary.
su2double GetAoA(void)
Get the angle of attack of the body. This is the angle between a reference line on a lifting body (of...
void SetTke_FreeStream(su2double val_tke_freestream)
Set the Froude number for free surface problems.
su2double GetActDiskOutlet_TotalTemperature(string val_marker)
Get the back pressure (static) at an outlet boundary.
su2double GetPrandtl_Lam(void)
Get the value of the laminar Prandtl number.
su2double Get_Alpha_RKStep(unsigned short val_step)
Get the alpha (convective) coefficients for the Runge-Kutta integration scheme.
su2double GetMach(void)
Get the value of the Mach number (velocity divided by speed of sound).
su2double GetInflow_Mach(string val_marker)
Get the fan face Mach number at an engine inflow boundary.
unsigned short GetnMarker_Monitoring(void)
Get the total number of monitoring markers.
su2double GetdCMz_dCL(void)
Value of the weight of the CD, CL, CM optimization.
su2double GetRefLength(void)
Get the reference length for computing moment (the default value is 1).
su2double GetTarget_CL(void)
Get the value specified for the target CL.
su2double GetGiles_RelaxFactorFourier(string val_marker)
Get the relax factor for the fourier component for the Giles BC.
bool GetGrid_Movement(void)
Get information about the grid movement.
su2double GetInlet_Ttotal(string val_index)
Get the total temperature at an inlet boundary.
unsigned short GetnMarker_NearFieldBound(void)
Get the total number of boundary markers.
su2double GetEngine_Force(unsigned short val_imarker)
Get the back pressure (static) at an outlet boundary.
su2double GetViscosity_FreeStream(void)
Get the value of the frestream temperature.
bool GetGravityForce(void)
Get information about the gravity force.
void SetDensity_FreeStreamND(su2double val_density_freestreamnd)
Set the Froude number for free surface problems.
su2double GetModVel_FreeStream(void)
Get the value of the frestream temperature.
su2double GetGiles_RelaxFactorAverage(string val_marker)
Get the relax factor for the average component for the Giles BC.
su2double GetGas_ConstantND(void)
Get the value of specific gas constant.
void SetdCL_dAlpha(su2double val_dcl_dalpha)
Value of the weight of the CD, CL, CM optimization.
su2double GetActDisk_StaticPressRatio(unsigned short val_marker)
Get the back pressure (static) at an outlet boundary.
bool GetBoolRiemann(void)
Verify if there is any Riemann Boundary Condition option specified from config file.
unsigned short GetnMarker_ActDiskOutlet(void)
Get the total number of boundary markers.
void SetInflow_ReverseMassFlow(unsigned short val_imarker, su2double val_fanface_reversemassflow)
Set the reverse flow at an engine inflow boundary.
void SetActDisk_Area(unsigned short val_imarker, su2double val_actdisk_area)
Get the back pressure (static) at an outlet boundary.
su2double GetIsothermal_Temperature(string val_index)
Get the wall temperature (static) at an isothermal boundary.
su2double GetdCL_dAlpha(void)
Get the value for the lift curve slope for fixed CL mode.
su2double GetSurface_Pressure(unsigned short val_imarker)
Get the pressure at an outlet boundary.
su2double GetExhaust_Temperature_Target(string val_index)
Get the total temperature at a nacelle boundary.
unsigned short GetnMarker_EngineInflow(void)
Get the total number of boundary markers.
su2double GetBuffet_k(void)
Get the buffet sensor sharpness coefficient.
void SetGas_Constant(su2double val_gas_constant)
Set the Froude number for free surface problems.
short GetMarker_All_SendRecv(unsigned short val_marker)
Get the send-receive information for a marker val_marker.
unsigned long GetIter_Fixed_NetThrust(void)
Get the value of iterations to re-evaluate the angle of attack.
bool GetEngine_HalfModel(void)
Only halg of the engine is in the compputational grid.
unsigned short GetKind_Linear_Solver_Prec(void)
Get the kind of preconditioner for the implicit solver.
su2double GetVenkat_LimiterCoeff(void)
Get the value of limiter coefficient.
su2double GetTke_FreeStream(void)
Get the value of the non-dimensionalized freestream viscosity.
su2double GetActDisk_Force(string val_marker)
Get the origin of the actuator disk.
su2double GetAcentric_Factor(void)
Get the value of the critical pressure.
su2double GetInflow_ReverseMassFlow(string val_marker)
Get the percentage of reverse flow at an engine inflow boundary.
void SetActDiskOutlet_TotalPressure(unsigned short val_imarker, su2double val_actdisk_totalpressure)
Get the back pressure (static) at an outlet boundary.
void SetExhaust_Force(unsigned short val_imarker, su2double val_exhaust_force)
Set the force balance at an engine exhaust boundary.
su2double GetMach_Motion(void)
Get the mach number based on the mesh velocity and freestream quantities.
void SetExhaust_Temperature(unsigned short val_imarker, su2double val_exhaust_temp)
Set the temperature (static) at an engine exhaust boundary.
su2double GetTemperature_FreeStream(void)
Get the value of the frestream temperature.
void SetInflow_Temperature(unsigned short val_imarker, su2double val_fanface_temperature)
Set the fan face static temperature at an engine inflow boundary.
void SetTemperature_Ref(su2double val_temperature_ref)
Set the reference temperature.
bool GetSteadyRestart(void)
Identifies if we want to restart from a steady or an unsteady solution.
void SetExhaust_GrossThrust(unsigned short val_imarker, su2double val_exhaust_grossthrust)
Set the gross thrust at an engine exhaust boundary.
unsigned short GetKind_Inlet(void)
Get the kind of inlet boundary condition treatment (total conditions or mass flow).
bool GetSubsonicEngine(void)
Divide the rectbles and hexahedron.
su2double GetActDisk_DeltaTemp(unsigned short val_marker)
Get the back pressure (static) at an outlet boundary.
su2double GetActDiskInlet_TotalTemperature(string val_marker)
Get the back pressure (static) at an outlet boundary.
void SetInflow_TotalTemperature(unsigned short val_imarker, su2double val_fanface_totaltemperature)
Set the fan face total temperature at an engine inflow boundary.
string GetMarker_EngineInflow_TagBound(unsigned short val_marker)
Get the index of the surface defined in the geometry file.
su2double GetMu_Temperature_RefND(void)
Get the value of the non-dimensional reference temperature for Sutherland model.
unsigned short GetKind_SlopeLimit_AdjFlow(void)
Get the method for limiting the spatial gradients.
su2double GetActDiskInlet_MassFlow(string val_marker)
Get the back pressure (static) at an outlet boundary.
void SetInflow_TotalPressure(unsigned short val_imarker, su2double val_fanface_totalpressure)
Set the fan face total pressure at an engine inflow boundary.
su2double GetDensity_Ref(void)
Get the value of the reference density for non-dimensionalization.
void SetLength_Ref(su2double val_length_ref)
Set the Froude number for free surface problems.
su2double GetInflow_Pressure(string val_marker)
Get the back pressure (static) at an engine inflow boundary.
void SetdCMz_dCL(su2double val_dcmz_dcl)
Value of the weight of the CD, CL, CM optimization.
void SetOmega_FreeStreamND(su2double val_omega_freestreamnd)
Set the Froude number for free surface problems.
su2double GetTemperature_Ref(void)
Get the value of the reference temperature for non-dimensionalization.
unsigned short GetnMarker_Turbomachinery(void)
number Turbomachinery performance option specified from config file.
su2double GetVelocity_Ref(void)
Get the value of the reference velocity for non-dimensionalization.
void SetTranspirationParams_DV()
Set the transpiration params using DV values.
void SetConductivity_Ref(su2double val_conductivity_ref)
Set the Froude number for free surface problems.
su2double * GetRiemann_FlowDir(string val_marker)
Get the Flowdir at Riemann boundary.
su2double GetEngineInflow_Target(string val_marker)
Get the target (pressure, massflow, etc) at an engine inflow boundary.
string GetUnsteady_FileName(string val_filename, int val_iter)
Augment the input filename with the iteration number for an unsteady file.
void SetEnergy_FreeStream(su2double val_energy_freestream)
Set the Froude number for free surface problems.
void SetEngine_Area(unsigned short val_imarker, su2double val_engine_area)
Get the back pressure (static) at an outlet boundary.
su2double GetAeroelastic_Flutter_Speed_Index(void)
Aeroelastic Flutter Speed Index.
unsigned short GetMarker_All_Monitoring(unsigned short val_marker)
Get the monitoring information for a marker val_marker.
su2double GetOmega_FreeStreamND(void)
Get the value of the non-dimensionalized freestream viscosity.
void SetKt_ConstantND(su2double kt_const)
Set the value of the non-dimensional thermal conductivity.
su2double GetExhaust_Force(string val_marker)
Get the force balance at an engine exhaust boundary.
su2double GetInflow_RamDrag(string val_marker)
Get the ram drag at an engine inflow boundary.
su2double * GetGiles_FlowDir(string val_marker)
Get the Flowdir for the Giles BC.
void SetActDiskInlet_MassFlow(unsigned short val_imarker, su2double val_actdisk_massflow)
Get the back pressure (static) at an outlet boundary.
su2double GetPressure_FreeStream(void)
Get the value of the non-dimensionalized freestream pressure.
su2double GetSurface_SecondOverUniform(unsigned short val_imarker)
Get the relative secondary flow strength at the surface.
void SetActDiskInlet_TotalTemperature(unsigned short val_imarker, su2double val_actdisk_totaltemp)
Get the back pressure (static) at an outlet boundary.
string GetMarker_All_TagBound(unsigned short val_marker)
Get the index of the surface defined in the geometry file.
su2double GetActDiskInlet_Force(string val_marker)
Get the back pressure (static) at an outlet boundary.
bool GetFSI_Simulation(void)
Check if the simulation we are running is a FSI simulation.
unsigned short GetKind_Upwind_Flow(void)
Get the kind of upwind convective numerical scheme for the flow equations.
su2double GetKt_ConstantND(void)
Get the value of the non-dimensional thermal conductivity.
static unsigned short GetnZone(string val_mesh_filename, unsigned short val_format, CConfig *config)
Gets the number of zones in the mesh file.
su2double GetEngine_GrossThrust(unsigned short val_imarker)
Get the back pressure (static) at an outlet boundary.
unsigned short GetnMarker_TurboPerformance(void)
number Turbomachinery performance option specified from config file.
bool GetBody_Force(void)
Get information about the body force.
su2double GetEngine_NetThrust(unsigned short val_imarker)
Get the back pressure (static) at an outlet boundary.
su2double GetActDiskOutlet_GrossThrust(string val_marker)
Get the back pressure (static) at an outlet boundary.
void SetDelta_UnstTimeND(su2double val_delta_unsttimend)
Set the value of the unsteadty time step using the CFL number.
su2double GetSurface_TotalPressure(unsigned short val_imarker)
Get the total pressure at an outlet boundary.
su2double GetActDisk_Power(string val_marker)
Get the origin of the actuator disk.
bool GetFixed_CM_Mode(void)
Get information about whether to use fixed CL mode.
void SetExhaust_TotalTemperature(unsigned short val_imarker, su2double val_exhaust_totaltemp)
Set the total temperature at an engine exhaust boundary.
void SetActDisk_GrossThrust(unsigned short val_imarker, su2double val_actdisk_grossthrust)
Get the back pressure (static) at an outlet boundary.
void SetActDisk_BCThrust_Old(string val_marker, su2double val_actdisk_bcthrust_old)
Get the back pressure (static) at an outlet boundary.
void SetNonphysical_Reconstr(unsigned long val_nonphys_reconstr)
Set the current number of non-physical reconstructions for 2nd-order upwinding.
su2double GetGas_Constant_Ref(void)
Get the reference value for the specific gas constant.
unsigned long GetExtIter(void)
Get the current external iteration number.
void SetPressure_Ref(su2double val_pressure_ref)
Set the Froude number for free surface problems.
void SetEngine_GrossThrust(unsigned short val_imarker, su2double val_engine_grossthrust)
Get the back pressure (static) at an outlet boundary.
void SetTke_FreeStreamND(su2double val_tke_freestreamnd)
Set the Froude number for free surface problems.
void SetPressure_FreeStreamND(su2double val_pressure_freestreamnd)
Set the Froude number for free surface problems.
su2double GetEnergy_FreeStream(void)
Get the value of the frestream temperature.
unsigned short GetConsole_Output_Verb(void)
Get the verbosity level of the console output.
su2double GetDelta_UnstTime(void)
If we are prforming an unsteady simulation, there is only one value of the time step for the complete...
su2double GetFan_Poly_Eff(void)
Get the value of the reference viscosity for non-dimensionalization.
bool GetMUSCL_Flow(void)
Get if the upwind scheme used MUSCL or not.
unsigned short GetRef_NonDim(void)
Get the kind of non-dimensionalization.
su2double GetdCD_dCMy(void)
Value of the weight of the CD, CL, CM optimization.
su2double GetActDisk_Mach(string val_marker)
Get the origin of the actuator disk.
su2double GetActDisk_TotalTempRatio(unsigned short val_marker)
Get the back pressure (static) at an outlet boundary.
su2double GetInflow_MassFlow(string val_marker)
Get the mass flow rate at an engine inflow boundary.
su2double GetActDiskOutlet_TotalPressure(string val_marker)
Get the back pressure (static) at an outlet boundary.
long GetUnst_RestartIter(void)
Get the restart iteration number for unsteady simulations.
su2double GetMu_S(void)
Get the value of the reference S for Sutherland model.
void SetInflow_MassFlow(unsigned short val_imarker, su2double val_fanface_massflow)
Set the massflow at an engine inflow boundary.
su2double GetEngine_Mach(unsigned short val_imarker)
Get the back pressure (static) at an outlet boundary.
su2double GetTurb2LamViscRatio_FreeStream(void)
Get the value of the turbulent to laminar viscosity ratio.
void SetActDisk_NetThrust(unsigned short val_imarker, su2double val_actdisk_netthrust)
Get the back pressure (static) at an outlet boundary.
su2double GetExhaust_Power(string val_marker)
Get the power at an engine exhaust boundary.
unsigned short GetMarker_All_TurbomachineryFlag(unsigned short val_marker)
Get the Turbomachinery flag information for a marker val_marker.
su2double GetMu_ConstantND(void)
Get the value of the non-dimensional constant viscosity.
unsigned short GetnMarker_EngineExhaust(void)
Get the total number of boundary markers.
unsigned short GetKind_PerformanceAverageProcess(void)
Get the kind of mixing process for averaging quantities at the boundaries.
void SetExhaust_Power(unsigned short val_imarker, su2double val_exhaust_power)
Set the power at an engine exhaust boundary.
void SetPressure_FreeStream(su2double val_pressure_freestream)
Set the Froude number for free surface problems.
su2double GetActDisk_DeltaPress(unsigned short val_marker)
Get the back pressure (static) at an outlet boundary.
void GetTranspirationParams(string val_marker, su2double &x0, su2double &x1, su2double &x2, su2double &x3, su2double &y0, su2double &y1, su2double &y2, su2double &y3, su2double &eps0, su2double &eps1, su2double &eps2, su2double &eps3)
Get the wall transpiration parameters.
bool GetFixed_CL_Mode(void)
Get information about whether to use fixed CL mode.
void SetActDisk_TotalPressRatio(unsigned short val_imarker, su2double val_actdisk_pressratio)
Get the back pressure (static) at an outlet boundary.
su2double GetAeroelastic_Airfoil_Mass_Ratio(void)
Aeroelastic Airfoil Mass Ratio.
bool GetDiscrete_Adjoint(void)
Get the indicator whether we are solving an discrete adjoint problem.
bool GetWind_Gust(void)
Get information about the wind gust.
unsigned short GetiZone(void)
Provides the number of varaibles.
void SetEnergy_FreeStreamND(su2double val_energy_freestreamnd)
Set the Froude number for free surface problems.
void SetActDisk_Force(unsigned short val_imarker, su2double val_actdisk_force)
Get the back pressure (static) at an outlet boundary.
void SetActDisk_StaticTempRatio(unsigned short val_imarker, su2double val_actdisk_tempratio)
Get the back pressure (static) at an outlet boundary.
unsigned short GetKind_FluidModel(void)
Fluid model that we are using.
unsigned short GetKind_RoeLowDiss(void)
Get the Kind of Roe Low Dissipation Scheme for Unsteady flows.
unsigned short GetKind_InitOption(void)
free stream option to initialize the solution
unsigned short GetKind_ActDisk(void)
Get the kind of inlet boundary condition treatment (total conditions or mass flow).
void SetActDiskInlet_RamDrag(unsigned short val_imarker, su2double val_actdisk_ramdrag)
Get the back pressure (static) at an outlet boundary.
bool GetAxisymmetric(void)
Get information about the axisymmetric frame.
void SetActDiskInlet_Force(unsigned short val_imarker, su2double val_actdisk_force)
Get the back pressure (static) at an outlet boundary.
bool GetUpdate_AoA(void)
Get information about whether to update the AoA for fixed lift mode.
su2double * GetFreeStreamTurboNormal(void)
Set freestream turbonormal for initializing solution.
void SetActDisk_Power(unsigned short val_imarker, su2double val_actdisk_power)
Get the back pressure (static) at an outlet boundary.
su2double GetTurbulenceIntensity_FreeStream(void)
Get the value of the non-dimensionalized freestream turbulence intensity.
su2double GetExhaust_MassFlow(string val_marker)
Get the massflow at an engine exhaust boundary.
su2double GetSurface_MomentumDistortion(unsigned short val_imarker)
Get the momentum distortion at the surface.
su2double GetInflow_Temperature(string val_marker)
Get the temperature (static) at an engine inflow boundary.
su2double GetTotal_UnstTimeND(void)
If we are prforming an unsteady simulation, there is only one value of the time step for the complete...
su2double GetGas_Constant(void)
Get the value of specific gas constant.
su2double GetDensity_FreeStreamND(void)
Get the value of the non-dimensionalized freestream density.
unsigned short GetKind_Upwind(void)
Get kind of upwind scheme for the convective terms.
void SetInflow_RamDrag(unsigned short val_imarker, su2double val_fanface_ramdrag)
Set the ram drag temperature at an engine inflow boundary.
su2double GetmaxTurkelBeta()
Get the minimum value of Beta for Roe-Turkel preconditioner.
void SetActDiskInlet_ReverseMassFlow(unsigned short val_imarker, su2double val_actdisk_area)
Get the back pressure (static) at an outlet boundary.
su2double GetActDiskInlet_RamDrag(string val_marker)
Get the back pressure (static) at an outlet boundary.
void SetEngine_Force(unsigned short val_imarker, su2double val_engine_force)
Set the back pressure (static) at an outlet boundary.
su2double * GetSubsonicEngine_Cyl(void)
Get the the coordinates where of the box where a subsonic region is imposed.
bool GetWall_Functions(void)
Get information about whether to use wall functions.
su2double GetRiemann_Var1(string val_marker)
Get the var 1 at Riemann boundary.
su2double GetRefArea(void)
Get the reference area for non dimensional coefficient computation. If the value from the is 0 then,...
void SetUpdate_AoA(bool val_update)
Set the value of the boolean for updating AoA in fixed lift mode.
void SetViscosity_FreeStream(su2double val_viscosity_freestream)
Set the Froude number for free surface problems.
void SetViscosity_FreeStreamND(su2double val_viscosity_freestreamnd)
Set the Froude number for free surface problems.
unsigned short GetKind_Engine_Inflow(void)
Get the kind of inlet boundary condition treatment (total conditions or mass flow).
su2double GetActDisk_NetThrust(string val_marker)
Get the origin of the actuator disk.
su2double GetRefElemLength(void)
Get the reference element length for computing the slope limiting epsilon.
void SetdCMy_dCL(su2double val_dcmy_dcl)
Value of the weight of the CD, CL, CM optimization.
string GetSolution_FlowFileName(void)
Get the name of the file with the solution of the flow problem.
void SetUpdate_BCThrust_Bool(bool val_update)
Set the value of the boolean for updating AoA in fixed lift mode.
void SetGas_ConstantND(su2double val_gas_constantnd)
Set the Froude number for free surface problems.
unsigned short GetKind_SlopeLimit_Turb(void)
Get the method for limiting the spatial gradients.
su2double GetDamp_Engine_Exhaust(void)
Value of the damping factor for the engine exhaust inlet bc.
su2double GetdNetThrust_dBCThrust(void)
Get the value of the damping coefficient for fixed CL mode.
bool GetTranspiration_Objective(void)
Provides the transpiration objective information.
su2double GetTotal_UnstTime(void)
If we are performing an unsteady simulation, this is the value of max physical time for which we run ...
void SetActDiskOutlet_MassFlow(unsigned short val_imarker, su2double val_actdisk_massflow)
Get the back pressure (static) at an outlet boundary.
su2double GetViscosity_Ref(void)
Get the value of the reference viscosity for non-dimensionalization.
su2double GetInlet_Pressure(string val_index)
Get the pressure at a supersonic inlet boundary.
void SetdCD_dCL(su2double val_dcd_dcl)
Value of the weight of the CD, CL, CM optimization.
bool GetRestart(void)
Provides the restart information.
void SetEngine_Power(unsigned short val_imarker, su2double val_engine_power)
Get the back pressure (static) at an outlet boundary.
su2double GetActDisk_PressJump(string val_marker, unsigned short val_index)
Get the thrust corffient of the actuator disk.
void SetInitial_BCThrust(su2double val_bcthrust)
Get the value of the non-dimensionalized actuator disk turbulence intensity.
void SetActDisk_DeltaTemp(unsigned short val_imarker, su2double val_actdisk_deltatemp)
Get the back pressure (static) at an outlet boundary.
su2double GetActDisk_MassFlow(string val_marker)
Get the origin of the actuator disk.
su2double GetWeight_ObjFunc(unsigned short val_obj)
Get the weight of objective function. There are several options: Drag coefficient,...
void SetFroude(su2double val_froude)
Set the Froude number for free surface problems.
su2double GetDensity_FreeStream(void)
Get the value of the frestream temperature.
su2double GetActDiskInlet_TotalPressure(string val_marker)
Get the back pressure (static) at an outlet boundary.
unsigned short GetnMGLevels(void)
Get the number of multigrid levels.
su2double GetMax_DeltaTime(void)
Get the Courant Friedrich Levi number for unsteady simulations.
su2double GetMu_Ref(void)
Get the value of the reference viscosity for Sutherland model.
void SetDensity_Ref(su2double val_density_ref)
Set the Froude number for free surface problems.
string GetMultizone_FileName(string val_filename, int val_iZone)
Append the zone index to the restart or the solution files.
su2double GetInlet_Temperature(string val_index)
Get the temperature at a supersonic inlet boundary.
su2double GetActDisk_ReverseMassFlow(string val_marker)
Get the tip radius of th actuator disk.
su2double * GetVelocity_FreeStream(void)
Get the vector of the dimensionalized freestream velocity.
void SetActDisk_BCThrust(string val_marker, su2double val_actdisk_bcthrust)
Get the back pressure (static) at an outlet boundary.
void SetActDiskOutlet_Force(unsigned short val_imarker, su2double val_actdisk_force)
Get the back pressure (static) at an outlet boundary.
bool GetBuffet_Monitoring(void)
Provides the buffet monitoring information.
su2double GetActDisk_BCThrust(string val_marker)
Get the origin of the actuator disk.
su2double GetActDisk_TotalPressRatio(unsigned short val_marker)
Get the back pressure (static) at an outlet boundary.
su2double GetExhaust_Pressure_Target(string val_index)
Get the total pressure at an nacelle boundary.
su2double GetActDiskOutlet_Pressure(string val_marker)
Get the back pressure (static) at an outlet boundary.
unsigned short GetKind_ViscosityModel(void)
Get the value of the viscosity model.
su2double GetTke_FreeStreamND(void)
Get the value of the non-dimensionalized freestream viscosity.
su2double GetAverageMachLimit(void)
Get mach limit for average massflow-based procedure .
su2double GetActDiskOutlet_Temperature(string val_marker)
Get the back pressure (static) at an outlet boundary.
void SetActDisk_MassFlow(unsigned short val_imarker, su2double val_actdisk_massflow)
Get the back pressure (static) at an outlet boundary.
su2double GetActDiskInlet_Power(string val_marker)
Get the back pressure (static) at an outlet boundary.
unsigned short GetKind_TurboMachinery(unsigned short val_iZone)
Get the kind of turbomachinery architecture.
void SetExhaust_Pressure(unsigned short val_imarker, su2double val_exhaust_pressure)
Set the back pressure (static) at an engine exhaust boundary.
void SetTemperature_FreeStreamND(su2double val_temperature_freestreamnd)
Set the Froude number for free surface problems.
unsigned short GetSystemMeasurements(void)
Governing equations of the flow (it can be different from the run time equation).
su2double GetGiles_Var1(string val_marker)
Get the var 1 for the Giels BC.
unsigned short GetMarker_CfgFile_TagBound(string val_marker)
Get the index in the config information of the marker val_marker.
unsigned short GetKind_Gradient_Method(void)
Get the kind of method for computation of spatial gradients.
void SetdCMx_dCL(su2double val_dcmx_dcl)
Value of the weight of the CD, CL, CM optimization.
void SetMu_SND(su2double mu_s)
Set the value of the non-dimensional S for Sutherland model.
void SetEngine_NetThrust(unsigned short val_imarker, su2double val_engine_netthrust)
Get the back pressure (static) at an outlet boundary.
su2double GetActDisk_GrossThrust(unsigned short val_marker)
Get the back pressure (static) at an outlet boundary.
su2double GetSurface_Uniformity(unsigned short val_imarker)
Get the streamwise flow uniformity at the surface.
void GetNormal(su2double *val_normal)
Copy the the normal vector of a face.
unsigned long GetNode(unsigned short val_node)
Get the nodes of the edge.
Main class for defining the Euler's flow solver.
void BC_TurboRiemann(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose the boundary condition using characteristic recostruction.
void SetTotal_Prop_Eff(su2double val_Total_Prop_Eff)
Store the total (inviscid + viscous) non dimensional drag coefficient.
su2double * iPoint_UndLapl
Auxiliary variable for the undivided Laplacians.
su2double * Surface_MaxHF_Visc
Maximum heat flux for each monitored surface.
su2double Temperature_Inf
Energy at the infinity.
su2double * Primitive_i
Auxiliary nPrimVar vector for storing the primitive at point i.
su2double * Surface_CFx_Mnt
x Force coefficient (inviscid contribution) for each monitoring surface.
su2double * CEff_Inv
Efficiency (Cl/Cd) (inviscid contribution) for each boundary.
su2double AllBound_CFz_Inv
Total z force coefficient (inviscid contribution) for all the boundaries.
void BC_Engine_Inflow(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose the nacelle inflow boundary condition.
su2double Gamma
Fluid's Gamma constant (ratio of specific heats).
su2double Total_CD_Prev
Total drag coefficient for all the boundaries (fixed lift mode).
su2double Total_ComboObj
Total 'combo' objective for all monitored boundaries.
su2double * Surface_CFy_Inv
y Force coefficient (inviscid contribution) for each monitoring surface.
void Evaluate_ObjFunc(CConfig *config)
Compute weighted-sum "combo" objective output.
su2double AllBound_CMerit_Inv
Rotor Figure of Merit (inviscid contribution) for all the boundaries.
void Set_MPI_Nearfield(CGeometry *geometry, CConfig *config)
Parallelization of Undivided Laplacian.
su2double AoA_Prev
Old value of the AoA for fixed lift mode.
void ComputeConsExtrapolation(CConfig *config)
Compute the extrapolated quantities, for MUSCL upwind 2nd reconstruction, in a more thermodynamic con...
complex< su2double > *** CkInflow
unsigned short nMarkerTurboPerf
Number of turbo performance.
su2double * Surface_CMz_Inv
z Moment coefficient (inviscid contribution) for each monitoring surface.
su2double Energy_Inf
Energy at the infinity.
su2double * Surface_CD_Mnt
Drag coefficient (inviscid contribution) for each monitoring surface.
void UpdateSolution_BGS(CGeometry *geometry, CConfig *config)
Store the BGS solution in the previous subiteration in the corresponding vector.
su2double ** RadialEquilibriumPressure
void SetActDisk_BCThrust(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, bool Output)
Update the AoA and freestream velocity at the farfield.
su2double * CQ_Mnt
Torque coefficient (moment in -x direction, inviscid contribution) for each boundary.
void Set_MPI_Sensor(CGeometry *geometry, CConfig *config)
Parallelization of SetPressure_Sensor.
su2double * CSF_Mnt
Sideforce coefficient (inviscid contribution) for each boundary.
su2double Total_CMz_Prev
Total drag coefficient for all the boundaries (fixed lift mode).
su2double * Primitive
Auxiliary nPrimVar vector.
su2double Total_CMx_Prev
Total drag coefficient for all the boundaries (fixed lift mode).
su2double AllBound_CMz_Inv
Total z moment coefficient (inviscid contribution) for all the boundaries.
su2double Total_CMy
Total y moment coefficient for all the boundaries.
CFluidModel * FluidModel
fluid model used in the solver
su2double * CL_Inv
Lift coefficient (inviscid contribution) for each boundary.
void SetNondimensionalization(CConfig *config, unsigned short iMesh)
Set the solver nondimensionalization.
su2double Total_CNearFieldOF
Total Near-Field Pressure coefficient for all the boundaries.
su2double * Surface_CMy_Inv
y Moment coefficient (inviscid contribution) for each monitoring surface.
su2double * Surface_CD
Drag coefficient for each monitoring surface.
su2double * CoPz_Inv
z Moment coefficient (inviscid contribution) for each boundary.
void ExplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config)
Update the solution using the explicit Euler scheme.
void SetTranspiration(CGeometry *geometry, CConfig *config)
Set transpiration value.
su2double Gamma_Minus_One
Fluids's Gamma - 1.0 .
su2double GetSlidingState(unsigned short val_marker, unsigned long val_vertex, unsigned short val_state, unsigned long donor_index)
Get the outer state for fluid interface nodes.
void BC_Riemann(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose the boundary condition using characteristic recostruction.
void SetTotal_MFR(su2double val_Total_MFR)
Store the total (inviscid + viscous) non dimensional drag coefficient.
su2double Total_AeroCD
Total aero drag coefficient for all the boundaries.
su2double GetTotal_CD(void)
Provide the total (inviscid + viscous) non dimensional drag coefficient.
su2double GetDensity_Inf(void)
Compute the density at the infinity.
su2double * Cauchy_Serie
Complete Cauchy serial.
void Set_MPI_Solution_Old(CGeometry *geometry, CConfig *config)
Impose the send-receive boundary condition.
su2double Old_Func
Old value of the objective function (the function which is monitored).
unsigned long GetDonorGlobalIndex(unsigned short val_marker, unsigned long val_vertex)
Value of the characteristic global index at the boundaries.
void BC_Interface_Boundary(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short val_marker)
Impose the interface boundary condition using the residual.
su2double Mach_Inf
Mach number at the infinity.
su2double AllBound_CD_Mnt
Total drag coefficient (inviscid contribution) for all the boundaries.
su2double * Surface_CD_Inv
Drag coefficient (inviscid contribution) for each monitoring surface.
su2double AllBound_CD_Inv
Total drag coefficient (inviscid contribution) for all the boundaries.
su2double Cauchy_Func
Current value of the convergence indicator at one iteration.
void SetActDisk_DeltaT(unsigned short val_marker, unsigned long val_vertex, su2double val_deltat)
Value of the characteristic global index at the boundaries.
su2double Total_CSF
Total sideforce coefficient for all the boundaries.
su2double GetActDisk_DeltaP(unsigned short val_marker, unsigned long val_vertex)
Value of the characteristic global index at the boundaries.
su2double Total_CoPy
Total y moment coefficient for all the boundaries.
su2double * PrimVar_i
Auxiliary vector for storing the solution at point i.
su2double * CT_Inv
Thrust coefficient (force in -x direction, inviscid contribution) for each boundary.
su2double Total_IDR
Total IDC coefficient for all the boundaries.
void SetCentered_Dissipation_Sensor(CGeometry *geometry, CConfig *config)
Compute a pressure sensor switch.
su2double Total_Custom_ObjFunc
Total custom objective function for all the boundaries.
su2double AoA_old
Old value of the angle of attack (monitored).
su2double * Surface_CFz_Inv
z Force coefficient (inviscid contribution) for each monitoring surface.
su2double Pressure_Inf
Pressure at the infinity.
void Source_Template(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short iMesh)
Source term integration.
su2double *** AverageTurboVelocity
void PreprocessBC_Giles(CGeometry *geometry, CConfig *config, CNumerics *conv_numerics, unsigned short marker_flag)
It computes Fourier transformation for the needed quantities along the pitch for each span in turboma...
su2double * CoPz_Mnt
z Moment coefficient (inviscid contribution) for each boundary.
su2double * CD_Inv
Drag coefficient (inviscid contribution) for each boundary.
su2double AllBound_Cmu
Total jet blowing coefficientfor all the boundaries.
unsigned short Cauchy_Counter
Number of elements of the Cauchy serial.
void Set_MPI_Solution(CGeometry *geometry, CConfig *config)
Impose the send-receive boundary condition.
su2double * Surface_CFz
z Force coefficient for each monitoring surface.
unsigned long * nVertex
Store nVertex at each marker for deallocation.
su2double Cauchy_Value
Summed value of the convergence indicator.
su2double ** ExtAverageDensity
void BC_Far_Field(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose the far-field boundary condition using characteristics.
su2double ** HeatFlux
Heat transfer coefficient for each boundary and vertex.
su2double * jPoint_UndLapl
Auxiliary variable for the undivided Laplacians.
void BC_Sym_Plane(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose the symmetry boundary condition using the residual.
su2double * CMy_Inv
y Moment coefficient (inviscid contribution) for each boundary.
su2double AllBound_CMx_Mnt
Total x moment coefficient (inviscid contribution) for all the boundaries.
void BC_Engine_Exhaust(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose the ancelle exhaust boundary condition.
su2double ** HeatFluxTarget
Heat transfer coefficient for each boundary and vertex.
void SetPrimitive_Limiter(CGeometry *geometry, CConfig *config)
Compute the limiter of the primitive variables.
void Set_MPI_Primitive_Gradient(CGeometry *geometry, CConfig *config)
Compute the gradient of the primitive variables using a Least-Squares method, and stores the result i...
su2double * Surface_HF_Visc
Total (integrated) heat flux for each monitored surface.
su2double Total_CMx
Total x moment coefficient for all the boundaries.
void LoadRestart(CGeometry **geometry, CSolver ***solver, CConfig *config, int val_iter, bool val_update_geo)
Load a solution from a restart file.
su2double GetInletAtVertex(su2double *val_inlet, unsigned long val_inlet_point, unsigned short val_kind_marker, string val_marker, CGeometry *geometry, CConfig *config)
Get the set of value imposed at an inlet.
su2double AllBound_CMy_Inv
Total y moment coefficient (inviscid contribution) for all the boundaries.
su2double ** ActDisk_DeltaT
Value of the Delta T.
su2double **** SlidingState
su2double * MomentMomentum
Inviscid moment for each boundary.
su2double Total_CD
Total drag coefficient for all the boundaries.
void InitTurboContainers(CGeometry *geometry, CConfig *config)
Initilize turbo containers.
su2double GetPressure_Inf(void)
Compute the pressure at the infinity.
su2double * Inflow_Area
Boundary total area.
void SetUniformInlet(CConfig *config, unsigned short iMarker)
Set a uniform inlet profile.
void SetTotal_Power(su2double val_Total_Power)
Store the total (inviscid + viscous) non dimensional drag coefficient.
unsigned long ** DonorGlobalIndex
Value of the donor global index.
su2double *** Inlet_FlowDir
Value of the Flow Direction.
void ImplicitEuler_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config)
Update the solution using an implicit Euler scheme.
su2double ** OldAveragePressure
su2double AllBound_CQ_Inv
Total torque coefficient (inviscid contribution) for all the boundaries.
complex< su2double > *** CkOutflow2
su2double * GetCharacPrimVar(unsigned short val_marker, unsigned long val_vertex)
Value of the characteristic variables at the boundaries.
void SetTotal_Adiab_Eff(su2double val_Total_Adiab_Eff)
Store the total (inviscid + viscous) non dimensional drag coefficient.
su2double * CQ_Inv
Torque coefficient (moment in -x direction, inviscid contribution) for each boundary.
su2double *** AverageFlux
void Postprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh)
A virtual member.
void Set_MPI_Interface(CGeometry *geometry, CConfig *config)
Parallelization of Undivided Laplacian.
su2double ** AverageOmega
bool space_centered
True if space centered scheeme used.
su2double * CNearFieldOF_Inv
Near field pressure (inviscid contribution) for each boundary.
su2double Total_CMerit
Total rotor Figure of Merit for all the boundaries.
su2double ** CPressureTarget
Target Pressure coefficient for each boundary and vertex.
su2double * Surface_CEff
Side-force coefficient for each monitoring surface.
su2double Total_CMy_Prev
Total drag coefficient for all the boundaries (fixed lift mode).
su2double Total_Cmu
Jet blowing on all boundaries.
su2double ** YPlus
Yplus for each boundary and vertex.
su2double * Surface_CFz_Mnt
z Force coefficient (inviscid contribution) for each monitoring surface.
su2double *** AverageVelocity
su2double ** Inlet_Ptotal
Value of the Total P.
su2double * CFz_Inv
z Force coefficient (inviscid contribution) for each boundary.
su2double * Surface_CMy
y Moment coefficient for each monitoring surface.
void SetInletAtVertex(su2double *val_inlet, unsigned short iMarker, unsigned long iVertex)
Store of a set of provided inlet profile values at a vertex.
su2double * Surface_Cmu
Jet blowing coefficient for each monitoring surface.
su2double Density_Inf
Density at the infinity.
void BC_Supersonic_Outlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose a supersonic outlet boundary condition.
su2double *** TurboVelocityIn
su2double ** OldAverageDensity
su2double * Cmu
Jet blowing coeficient for each boundary.
su2double ** ExtAverageKine
void SetTotal_Poly_Eff(su2double val_Total_Poly_Eff)
Store the total (inviscid + viscous) non dimensional drag coefficient.
void Set_MPI_Solution_Gradient(CGeometry *geometry, CConfig *config)
Impose the send-receive boundary condition.
su2double *** CharacPrimVar
Value of the characteristic variables at each boundary.
su2double *** DonorPrimVar
Value of the donor variables at each boundary.
su2double * Velocity_Inf
Flow Velocity vector at the infinity.
su2double * Surface_CMz
z Moment coefficient for each monitoring surface.
su2double AllBound_CFz_Mnt
Total z force coefficient (inviscid contribution) for all the boundaries.
void Set_MPI_ActDisk(CSolver **solver_container, CGeometry *geometry, CConfig *config)
Parallelization of Undivided Laplacian.
su2double *** SpanTotalFlux
su2double Total_CFz
Total z force coefficient for all the boundaries.
void BC_ActDisk_Outlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose the engine exhaust boundary condition.
su2double AllBound_CoPz_Inv
Total z moment coefficient (inviscid contribution) for all the boundaries.
su2double ** ExtAverageNu
su2double * Surface_CFx_Inv
x Force coefficient (inviscid contribution) for each monitoring surface.
void Centered_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short iMesh, unsigned short iRKStep)
Compute the spatial integration using a centered scheme.
su2double * Surface_CSF_Mnt
Side-force coefficient (inviscid contribution) for each monitoring surface.
su2double * CMerit_Inv
Rotor Figure of Merit (inviscid contribution) for each boundary.
su2double * Surface_CMx_Mnt
x Moment coefficient (inviscid contribution) for each monitoring surface.
void SetMax_Eigenvalue(CGeometry *geometry, CConfig *config)
Compute the max eigenvalue.
void SetTotal_ReverseFlow(su2double val_ReverseFlow)
Store the total (inviscid + viscous) non dimensional drag coefficient.
su2double AllBound_CEff_Inv
Efficient coefficient (inviscid contribution) for all the boundaries.
su2double * CD_Mnt
Drag coefficient (inviscid contribution) for each boundary.
void SetTotal_SolidCD(su2double val_Total_SolidCD)
Store the total (inviscid + viscous) non dimensional drag coefficient.
su2double AllBound_CMz_Mnt
Total z moment coefficient (inviscid contribution) for all the boundaries.
su2double * Surface_CMx
x Moment coefficient for each monitoring surface.
su2double Total_CpDiff
Total Equivalent Area coefficient for all the boundaries.
void BC_Euler_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short val_marker)
Impose via the residual the Euler wall boundary condition.
su2double * Inflow_MassFlow
Mass flow rate for each boundary.
void ComputeBackVelocity(su2double *turboVelocity, su2double *turboNormal, su2double *cartesianVelocity, unsigned short marker_flag, unsigned short marker_kindturb)
it take a velocity in the cartesian reference of framework and transform into the turbomachinery fram...
void BC_Dirichlet(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short val_marker)
Impose the dirichlet boundary condition using the residual.
void SetInitialCondition(CGeometry **geometry, CSolver ***solver_container, CConfig *config, unsigned long ExtIter)
Set the initial condition for the Euler Equations.
unsigned long AoA_Counter
complex< su2double > *** CkOutflow1
void Set_MPI_Primitive_Limiter(CGeometry *geometry, CConfig *config)
Impose the send-receive boundary condition.
su2double Total_CL
Total lift coefficient for all the boundaries.
su2double * Surface_CL
Lift coefficient for each monitoring surface.
void SetTotal_AeroCD(su2double val_aerocd)
Set the value of the Aero drag.
su2double Total_CFy
Total y force coefficient for all the boundaries.
su2double * CMz_Mnt
z Moment coefficient (inviscid contribution) for each boundary.
su2double AllBound_CNearFieldOF_Inv
Near-Field press coefficient (inviscid contribution) for all the boundaries.
su2double *** OldAverageTurboVelocity
su2double * CFy_Mnt
y Force coefficient (inviscid contribution) for each boundary.
void Set_MPI_Undivided_Laplacian(CGeometry *geometry, CConfig *config)
Parallelization of Undivided Laplacian.
su2double * Surface_CMx_Inv
x Moment coefficient (inviscid contribution) for each monitoring surface.
void Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output)
Compute primitive variables and their gradients.
su2double * CEff_Mnt
Efficiency (Cl/Cd) (inviscid contribution) for each boundary.
su2double Total_CL_Prev
Total lift coefficient for all the boundaries (fixed lift mode).
su2double AllBound_CT_Inv
Total thrust coefficient (inviscid contribution) for all the boundaries.
void SetActDisk_DeltaP(unsigned short val_marker, unsigned long val_vertex, su2double val_deltap)
Value of the characteristic global index at the boundaries.
void BC_NearField_Boundary(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short val_marker)
Impose the near-field boundary condition using the residual.
su2double ** ExtAverageOmega
void Set_MPI_Solution_Limiter(CGeometry *geometry, CConfig *config)
Impose the send-receive boundary condition.
su2double AllBound_CMerit_Mnt
Rotor Figure of Merit (inviscid contribution) for all the boundaries.
su2double ** LowMach_Precontioner
Auxiliary vector for storing the inverse of Roe-turkel preconditioner.
void MixedOut_Average(CConfig *config, su2double val_init_pressure, su2double *val_Averaged_Flux, su2double *val_normal, su2double &pressure_mix, su2double &density_mix)
it performs a mixed out average of the nodes of a boundary.
bool euler_implicit
True if euler implicit scheme used.
su2double Total_CFx
Total x force coefficient for all the boundaries.
int GetnSlidingStates(unsigned short val_marker, unsigned long val_vertex)
Get the number of outer state for fluid interface nodes.
void Pressure_Forces(CGeometry *geometry, CConfig *config)
Compute the pressure forces and all the adimensional coefficients.
su2double * CL_Mnt
Lift coefficient (inviscid contribution) for each boundary.
su2double AllBound_CFy_Inv
Total y force coefficient (inviscid contribution) for all the boundaries.
su2double * Surface_CSF
Side-force coefficient for each monitoring surface.
void Upwind_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short iMesh)
Compute the spatial integration using a upwind scheme.
su2double * Secondary_j
Auxiliary nPrimVar vector for storing the primitive at point j.
su2double AllBound_CT_Mnt
Total thrust coefficient (inviscid contribution) for all the boundaries.
su2double * Exhaust_Pressure
Fan face pressure for each boundary.
void Momentum_Forces(CGeometry *geometry, CConfig *config)
Compute the pressure forces and all the adimensional coefficients.
void ComputeTurboVelocity(su2double *cartesianVelocity, su2double *turboNormal, su2double *turboVelocity, unsigned short marker_flag, unsigned short marker_kindturb)
it take a velocity in the cartesian reference of framework and transform into the turbomachinery fram...
su2double * Primitive_j
Auxiliary nPrimVar vector for storing the primitive at point j.
unsigned long nMarker
Total number of markers using the grid information.
su2double New_Func
Current value of the objective function (the function which is monitored).
void BC_Giles(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose the boundary condition using characteristic recostruction.
su2double Total_CoPz
Total z moment coefficient for all the boundaries.
virtual ~CEulerSolver(void)
Destructor of the class.
su2double * Surface_CEff_Inv
Side-force coefficient (inviscid contribution) for each monitoring surface.
su2double ** CPressure
Pressure coefficient for each boundary and vertex.
su2double * Surface_CMz_Mnt
z Moment coefficient (inviscid contribution) for each monitoring surface.
su2double ** ActDisk_DeltaP
Value of the Delta P.
su2double * Surface_CEff_Mnt
Side-force coefficient (inviscid contribution) for each monitoring surface.
void SetFreeStream_Solution(CConfig *config)
Set the solution using the Freestream values.
void BC_Inlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose a subsonic inlet boundary condition.
void SetDonorPrimVar(unsigned short val_marker, unsigned long val_vertex, unsigned short val_var, su2double val_value)
Value of the characteristic variables at the boundaries.
void SetUpwind_Ducros_Sensor(CGeometry *geometry, CConfig *config)
Compute Ducros Sensor for Roe Dissipation.
su2double AllBound_CoPx_Inv
Total x moment coefficient (inviscid contribution) for all the boundaries.
void BC_Outlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose the outlet boundary condition.
su2double Total_MaxHeat
Maximum heat flux on all boundaries.
su2double * CT_Mnt
Thrust coefficient (force in -x direction, inviscid contribution) for each boundary.
void Set_MPI_MaxEigenvalue(CGeometry *geometry, CConfig *config)
Parallelization of the Max eigenvalue.
su2double * CFy_Inv
y Force coefficient (inviscid contribution) for each boundary.
void PreprocessAverage(CSolver **solver, CGeometry *geometry, CConfig *config, unsigned short marker_flag)
It computes average quantities along the span for turbomachinery analysis.
su2double * CoPx_Mnt
x Moment coefficient (inviscid contribution) for each boundary.
su2double ** AverageDensity
void TurboAverageProcess(CSolver **solver, CGeometry *geometry, CConfig *config, unsigned short marker_flag)
It computes average quantities along the span for turbomachinery analysis.
void GatherInOutAverageValues(CConfig *config, CGeometry *geometry)
It gathers into the master node average quantities at inflow and outflow needed for turbomachinery an...
su2double * CFx_Mnt
x Force coefficient (inviscid contribution) for each boundary.
su2double * Surface_CL_Mnt
Lift coefficient (inviscid contribution) for each monitoring surface.
su2double * ForceInviscid
Inviscid force for each boundary.
su2double AllBound_CSF_Mnt
Total sideforce coefficient (inviscid contribution) for all the boundaries.
void SetTotal_NetThrust(su2double val_Total_NetThrust)
Store the total (inviscid + viscous) non dimensional drag coefficient.
su2double Total_SolidCD
Total drag coefficient for all the boundaries.
void BC_Supersonic_Inlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose a supersonic inlet boundary condition.
su2double ** ExtAveragePressure
su2double *** TurboVelocityOut
su2double Total_CQ
Total torque coefficient for all the boundaries.
su2double Total_HeatFluxDiff
Total Equivalent Area coefficient for all the boundaries.
su2double AllBound_CoPy_Mnt
Total y moment coefficient (inviscid contribution) for all the boundaries.
su2double * CoPx_Inv
x Moment coefficient (inviscid contribution) for each boundary.
void SetFreeStream_TurboSolution(CConfig *config)
Set the solution using the Freestream values.
void BC_Euler_Transpiration(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose via the residual the Euler wall boundary condition.
void ExplicitRK_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iRKStep)
Update the solution using a Runge-Kutta scheme.
su2double AllBound_CL_Mnt
Total lift coefficient (inviscid contribution) for all the boundaries.
su2double AllBound_CL_Inv
Total lift coefficient (inviscid contribution) for all the boundaries.
su2double * CMx_Inv
x Moment coefficient (inviscid contribution) for each boundary.
su2double AllBound_CMy_Mnt
Total y moment coefficient (inviscid contribution) for all the boundaries.
su2double AllBound_CoPx_Mnt
Total x moment coefficient (inviscid contribution) for all the boundaries.
su2double ** AveragePressure
su2double * GetDonorPrimVar(unsigned short val_marker, unsigned long val_vertex)
Value of the characteristic variables at the boundaries.
CEulerSolver(void)
Constructor of the class.
void BC_ActDisk(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker, bool val_inlet_surface)
Impose the engine inflow boundary condition.
su2double * Exhaust_MassFlow
Mass flow rate for each boundary.
void BC_Fluid_Interface(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config)
Impose the interface state across sliding meshes.
su2double AllBound_CEff_Mnt
Efficient coefficient (inviscid contribution) for all the boundaries.
su2double Total_CoPx
Total x moment coefficient for all the boundaries.
unsigned short nSpanWiseSections
Number of span-wise sections.
su2double * ForceMomentum
Inviscid force for each boundary.
su2double * CMy_Mnt
y Moment coefficient (inviscid contribution) for each boundary.
void SetResidual_DualTime(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iRKStep, unsigned short iMesh, unsigned short RunTime_EqSystem)
Set the total residual adding the term that comes from the Dual Time Strategy.
su2double AllBound_CFx_Mnt
Total x force coefficient (inviscid contribution) for all the boundaries.
su2double AllBound_CQ_Mnt
Total torque coefficient (inviscid contribution) for all the boundaries.
unsigned long BCThrust_Counter
su2double AllBound_CFy_Mnt
Total y force coefficient (inviscid contribution) for all the boundaries.
su2double Total_NetThrust
Total drag coefficient for all the boundaries.
su2double * Inflow_Pressure
Fan face pressure for each boundary.
su2double * Secondary
Auxiliary nPrimVar vector.
su2double * PrimVar_j
Auxiliary vector for storing the solution at point j.
void SetDonorGlobalIndex(unsigned short val_marker, unsigned long val_vertex, unsigned long val_index)
Value of the characteristic global index at the boundaries.
su2double * CSF_Inv
Sideforce coefficient (inviscid contribution) for each boundary.
void ComputeResidual_BGS(CGeometry *geometry, CConfig *config)
Set the value of the max residual and RMS residual.
void SetPrimitive_Gradient_GG(CGeometry *geometry, CConfig *config)
Compute the gradient of the primitive variables using Green-Gauss method, and stores the result in th...
su2double Total_Heat
Total heat load for all the boundaries.
void ClassicalRK4_Iteration(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iRKStep)
Update the solution using the classical fourth-order Runge-Kutta scheme.
void GetPower_Properties(CGeometry *geometry, CConfig *config, unsigned short iMesh, bool Output)
Compute the Fan face Mach number.
su2double AllBound_CSF_Inv
Total sideforce coefficient (inviscid contribution) for all the boundaries.
su2double AllBound_CoPy_Inv
Total y moment coefficient (inviscid contribution) for all the boundaries.
su2double * CMx_Mnt
x Moment coefficient (inviscid contribution) for each boundary.
void SetUndivided_Laplacian(CGeometry *geometry, CConfig *config)
Compute the undivided laplacian for the solution, except the energy equation.
void UpdateCustomBoundaryConditions(CGeometry **geometry_container, CConfig *config)
Update the multi-grid structure for the customized boundary conditions.
su2double * CFz_Mnt
z Force coefficient (inviscid contribution) for each boundary.
su2double AllBound_CFx_Inv
Total x force coefficient (inviscid contribution) for all the boundaries.
su2double * CFx_Inv
x Force coefficient (inviscid contribution) for each boundary.
su2double GetActDisk_DeltaT(unsigned short val_marker, unsigned long val_vertex)
Value of the characteristic global index at the boundaries.
su2double * MomentInviscid
Inviscid moment for each boundary.
su2double * Surface_CFy
y Force coefficient for each monitoring surface.
void BC_Custom(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short val_marker)
Impose the dirichlet boundary condition.
su2double * Surface_CSF_Inv
Side-force coefficient (inviscid contribution) for each monitoring surface.
void Source_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CNumerics *second_numerics, CConfig *config, unsigned short iMesh)
Source term integration.
su2double * Surface_CL_Inv
Lift coefficient (inviscid contribution) for each monitoring surface.
void SetPreconditioner(CConfig *config, unsigned long iPoint)
Compute the preconditioner for convergence acceleration by Roe-Turkel method.
su2double * CEquivArea_Inv
Equivalent area (inviscid contribution) for each boundary.
su2double Total_CT
Total thrust coefficient for all the boundaries.
su2double Total_CMz
Total z moment coefficient for all the boundaries.
void SetFarfield_AoA(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, bool Output)
Update the AoA and freestream velocity at the farfield.
su2double * Exhaust_Area
Boundary total area.
void SetTotal_ByPassProp_Eff(su2double val_Total_ByPassProp_Eff)
Store the total (inviscid + viscous) non dimensional drag coefficient.
su2double Total_CEff
Total efficiency coefficient for all the boundaries.
su2double * CMz_Inv
z Moment coefficient (inviscid contribution) for each boundary.
unsigned long SetPrimitive_Variables(CSolver **solver_container, CConfig *config, bool Output)
Compute the velocity^2, SoundSpeed, Pressure, Enthalpy, Viscosity.
su2double * Surface_CFy_Mnt
y Force coefficient (inviscid contribution) for each monitoring surface.
void SetTime_Step(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned long Iteration)
Compute the time step for solving the Euler equations.
su2double * GetVelocity_Inf(void)
Get the velocity at the infinity.
su2double * Secondary_i
Auxiliary nPrimVar vector for storing the primitive at point i.
void SetPrimitive_Gradient_LS(CGeometry *geometry, CConfig *config)
Compute the gradient of the primitive variables using a Least-Squares method, and stores the result i...
su2double ** Inlet_Ttotal
Value of the Total T.
su2double * Surface_CMy_Mnt
y Moment coefficient (inviscid contribution) for each monitoring surface.
su2double Total_Power
Total drag coefficient for all the boundaries.
su2double AllBound_CMx_Inv
Total x moment coefficient (inviscid contribution) for all the boundaries.
su2double * Inflow_Mach
Fan face mach number for each boundary.
void BC_ActDisk_Inlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose the engine inflow boundary condition.
su2double * Surface_CFx
x Force coefficient for each monitoring surface.
su2double AllBound_CoPz_Mnt
Total z moment coefficient (inviscid contribution) for all the boundaries.
unsigned short nSpanMax
Max number of maximum span-wise sections for all zones.
su2double * CoPy_Mnt
y Moment coefficient (inviscid contribution) for each boundary.
su2double Total_CEquivArea
Total Equivalent Area coefficient for all the boundaries.
su2double * CoPy_Inv
y Moment coefficient (inviscid contribution) for each boundary.
su2double * Exhaust_Temperature
Fan face mach number for each boundary.
su2double Total_IDC
Total IDC coefficient for all the boundaries.
su2double * CMerit_Mnt
Rotor Figure of Merit (inviscid contribution) for each boundary.
su2double *** ExtAverageTurboVelocity
bool least_squares
True if computing gradients by least squares.
Main class for defining the variables of the compressible Euler solver.
su2double GetCp()
Get fluid specific heat at constant pressure.
su2double GetdTdrho_e()
Get fluid temperature partial derivative.
su2double GetPressure()
Get fluid pressure.
su2double GetThermalConductivity()
Get fluid thermal conductivity.
su2double GetdTde_rho()
Get fluid temperature partial derivative.
virtual void SetTDState_hs(su2double h, su2double s)
virtual member that would be different for each gas model implemented
su2double GetSoundSpeed()
Get fluid speed of sound.
su2double Getdmudrho_T()
Get fluid dynamic viscosity partial derivative.
su2double GetdhdP_rho()
Get fluid pressure partial derivative.
virtual void SetTDState_rhoT(su2double rho, su2double T)
virtual member that would be different for each gas model implemented
su2double Getdktdrho_T()
Get fluid thermal conductivity partial derivative.
virtual void SetTDState_rhoe(su2double rho, su2double e)
virtual member that would be different for each gas model implemented
su2double GetStaticEnergy()
Get fluid internal energy.
su2double GetdktdT_rho()
Get fluid thermal conductivity partial derivative.
su2double GetLaminarViscosity()
Get fluid dynamic viscosity.
su2double GetdPde_rho()
Get fluid pressure partial derivative.
virtual void ComputeDerivativeNRBC_Prho(su2double P, su2double rho)
virtual member that would be different for each gas model implemented
su2double GetDensity()
Get fluid density.
virtual void SetTDState_PT(su2double P, su2double T)
virtual member that would be different for each gas model implemented
su2double GetdmudT_rho()
Get fluid dynamic viscosity partial derivative.
su2double GetdPdrho_e()
Get fluid pressure partial derivative.
virtual void SetTDState_Prho(su2double P, su2double rho)
virtual member that would be different for each gas model implemented
virtual void SetEnergy_Prho(su2double P, su2double rho)
virtual member that would be different for each gas model implemented
void SetLaminarViscosityModel(CConfig *config)
Set viscosity model.
su2double GetEntropy()
Get fluid entropy.
su2double GetTemperature()
Get fluid temperature.
void SetThermalConductivityModel(CConfig *config)
Set thermal conductivity model.
su2double Getdhdrho_P()
Get fluid pressure partial derivative.
Parent class for defining the geometry of the problem (complete geometry, multigrid agglomerated geom...
CEdge ** edge
Edge vector (dual grid information).
virtual unsigned long GetGlobal_nPointDomain()
A virtual member.
virtual void SetControlVolume(CConfig *config, unsigned short action)
A virtual member.
unsigned short GetnDim(void)
Get number of coordinates.
unsigned long GetnVertexSpan(unsigned short val_marker, unsigned short val_span)
Get number of vertices.
su2double GetCustomBoundaryTemperature(unsigned short val_marker, unsigned long val_vertex)
Get the value of the customized temperature at a specified vertex on a specified marker.
virtual void SetRestricted_GridVelocity(CGeometry *fine_mesh, CConfig *config)
A virtual member.
unsigned short GetnMarker(void)
Get number of markers.
virtual su2double GetMinAngularCoord(unsigned short val_marker, unsigned short val_span)
A virtual member.
CTurboVertex **** turbovertex
Boundary Vertex vector ordered for turbomachinery calculation(dual grid information).
unsigned long GetnPointDomain(void)
Get number of real points (that belong to the domain).
unsigned long GetnVertex(unsigned short val_marker)
Get number of vertices.
virtual unsigned long GetnTotVertexSpan(unsigned short val_marker, unsigned short val_span)
A virtual member.
virtual void SetCoord(CGeometry *geometry)
A virtual member.
virtual void Set_MPI_GridVel(CConfig *config)
A virtual member.
virtual void Set_MPI_Coord(CConfig *config)
A virtual member.
CVertex *** vertex
Boundary Vertex vector (dual grid information).
virtual void SetMaxLength(CConfig *config)
A virtual member.
unsigned long GetnEdge(void)
Get number of edges.
virtual void SetCoord_CG(void)
A virtual member.
su2double GetCustomBoundaryHeatFlux(unsigned short val_marker, unsigned long val_vertex)
Get the value of the customized normal heat flux at a specified vertex on a specified marker.
virtual su2double GetAverageTangGridVel(unsigned short val_marker, unsigned short val_span)
A virtual member.
unsigned short GetnSpanWiseSections(unsigned short marker_flag)
Get number of span wise section.
su2double * GetSpanWiseValue(unsigned short val_marker)
Get number of vertices.
unsigned short GetnZone(void)
Get number of zones.
unsigned long GetnPoint(void)
Get number of points.
unsigned long GetnFreqSpanMax(unsigned short marker_flag)
Get number of max frequencies for initializing the Fourier Coefficient for NR BC.
virtual su2double * GetAverageTurboNormal(unsigned short val_marker, unsigned short val_span)
A virtual member.
virtual su2double GetMaxAngularCoord(unsigned short val_marker, unsigned short val_span)
A virtual member.
virtual void SetBoundControlVolume(CConfig *config, unsigned short action)
A virtual member.
CPoint ** node
Node vector (dual grid information).
unsigned long * nVertex
Number of vertex for each marker.
virtual su2double GetSpanArea(unsigned short val_marker, unsigned short val_span)
A virtual member.
virtual long GetGlobal_to_Local_Point(unsigned long val_ipoint)
A virtual member.
unsigned long GetnFreqSpan(unsigned short val_marker, unsigned short val_span)
Get number of frequencies per span for NRBC.
virtual su2double GetTurboRadius(unsigned short val_marker, unsigned short val_span)
A virtual member.
Child class for defining ideal gas model.
void SetRoe_Dissipation(CGeometry *geometry, CConfig *config)
A virtual member.
void Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output)
Restart residual and compute gradients.
void BC_Euler_Transpiration(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose via the residual the Euler wall boundary condition.
~CNSSolver(void)
Destructor of the class.
unsigned long SetPrimitive_Variables(CSolver **solver_container, CConfig *config, bool Output)
Compute the velocity^2, SoundSpeed, Pressure, Enthalpy, Viscosity.
CNSSolver(void)
Constructor of the class.
void SetTime_Step(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned long Iteration)
Compute the time step for solving the Navier-Stokes equations with turbulence model.
void Viscous_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CConfig *config, unsigned short iMesh, unsigned short iRKStep)
Compute the viscous residuals.
su2double GetConjugateHeatVariable(unsigned short val_marker, unsigned long val_vertex, unsigned short pos_var)
Set the conjugate heat variables.
void Buffet_Monitoring(CGeometry *geometry, CConfig *config)
Compute the buffet sensor.
void Evaluate_ObjFunc(CConfig *config)
Compute weighted-sum "combo" objective output.
void BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose a constant heat-flux condition at the wall.
void Friction_Forces(CGeometry *geometry, CConfig *config)
Compute the viscous forces and all the addimensional coefficients.
void BC_Isothermal_Wall(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)
Impose the Navier-Stokes boundary condition (strong).
void BC_ConjugateHeat_Interface(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CConfig *config, unsigned short val_marker)
Impose the Navier-Stokes boundary condition (strong) with values from a CHT coupling.
void SetTauWall_WF(CGeometry *geometry, CSolver **solver_container, CConfig *config)
Computes the wall shear stress (Tau_Wall) on the surface using a wall function.
Main class for defining the variables of the compressible Navier-Stokes solver.
Class for defining the numerical methods.
void SetVelocity2_Inf(su2double val_velocity2)
Set the freestream velocity square.
void GetPMatrix_inv(su2double **val_invp_tensor, su2double *val_density, su2double *val_velocity, su2double *val_soundspeed, su2double *val_chi, su2double *val_kappa, su2double *val_normal)
Computation of the matrix P^{-1}, this matrix diagonalize the conservative Jacobians in the form $P^{...
void SetLambda(su2double val_lambda_i, su2double val_lambda_j)
Set the value of the spectral radius.
void SetWindGust(su2double *val_windgust_i, su2double *val_windgust_j)
Set the wind gust value.
void GetInviscidProjFlux(su2double *val_density, su2double *val_velocity, su2double *val_pressure, su2double *val_enthalpy, su2double *val_normal, su2double *val_Proj_Flux)
Compute the projected inviscid flux vector.
void SetPrimVarGradient(su2double **val_primvar_grad_i, su2double **val_primvar_grad_j)
Set the gradient of the primitive variables.
virtual void SetTauWall(su2double val_tauwall_i, su2double val_tauwall_j)
Set the value of the Tauwall.
virtual su2double GetPrecond_Beta()
Get the Preconditioning Beta.
void SetNeighbor(unsigned short val_neighbor_i, unsigned short val_neighbor_j)
Set the number of neighbor to a point.
void GetRMatrix(su2double val_pressure, su2double val_soundspeed, su2double val_density, su2double *val_velocity, su2double **val_invR_invPe)
Computation of the matrix R.
su2double GetDissipation()
Get the final Roe dissipation factor.
void SetNormal(su2double *val_normal)
Set the value of the normal vector to the face between two points.
void GetCharJump(su2double val_soundspeed, su2double val_density, su2double *prim_jump, su2double *char_jump)
Computation of the matrix R.
void GetPMatrix(su2double *val_density, su2double *val_velocity, su2double *val_soundspeed, su2double *val_enthalpy, su2double *val_chi, su2double *val_kappa, su2double *val_normal, su2double **val_p_tensor)
Computation of the matrix P for a generic fluid model.
void SetVolume(su2double val_volume)
Set the value of the volume of the control volume.
void SetSensor(su2double val_sensor_i, su2double val_sensor_j)
Set the value of the pressure sensor.
void SetCoord(su2double *val_coord_i, su2double *val_coord_j)
Set coordinates of the points.
void SetConservative(su2double *val_u_i, su2double *val_u_j)
Set the value of the conservative variables.
void SetSecondary(su2double *val_s_i, su2double *val_s_j)
Set the value of the primitive variables.
void ComputeResJacobianGiles(CFluidModel *FluidModel, su2double pressure, su2double density, su2double *turboVel, su2double alphaInBC, su2double gammaInBC, su2double **R_c, su2double **R_c_inv)
Computation of the flow Residual Jacoboan Matrix for Non Reflecting BC.
void SetUndivided_Laplacian(su2double *val_und_lapl_i, su2double *val_und_lapl_j)
Set the value of undivided laplacian.
virtual void ComputeResidual(su2double *val_residual, CConfig *config)
Compute the numerical residual.
void SetTurbKineticEnergy(su2double val_turb_ke_i, su2double val_turb_ke_j)
Set the turbulent kinetic energy.
void SetDissipation(su2double diss_i, su2double diss_j)
Sets the values of the roe dissipation.
void GetInviscidProjJac(su2double *val_velocity, su2double *val_energy, su2double *val_normal, su2double val_scale, su2double **val_Proj_Jac_tensor)
Compute the projection of the inviscid Jacobian matrices.
void SetGridVel(su2double *val_gridvel_i, su2double *val_gridvel_j)
Set the velocity of the computational grid.
void SetPrimitive(su2double *val_v_i, su2double *val_v_j)
Set the value of the primitive variables.
void SetWindGustDer(su2double *val_windgustder_i, su2double *val_windgustder_j)
Set the wind gust derivatives values.
Child class for defining the Peng-Robinson model.
void SetGridVel(unsigned short val_dim, su2double val_gridvel)
Set the value of the grid velocity at the point.
su2double GetVolume_nM1(void)
Get the volume of the control volume at time n+1.
bool GetDomain(void)
For parallel computation, its indicates if a point must be computed or not.
su2double GetWall_Distance(void)
Get the value of the distance to the nearest wall.
su2double GetVolume(void)
Get area or volume of the control volume.
bool GetPhysicalBoundary(void)
Provides information about if a point belong to the physical boundaries (without MPI).
su2double * GetGridVel(void)
Get the value of the grid velocity at the point.
void SetCoord(unsigned short val_dim, su2double val_coord)
Set the coordinates for the control volume.
unsigned short GetnNeighbor(void)
Get the number of neighbor of a point.
su2double GetMaxLength(void)
Get the maximum cell-center to cell-center length.
unsigned long GetChildren_CV(unsigned short val_nchildren_CV)
Get the children control volume of an agglomerated control volume.
su2double GetCoord(unsigned short val_dim)
Get the coordinates dor the control volume.
unsigned short GetnChildren_CV(void)
Get the number of children of an agglomerated control volume.
void SetnNeighbor(unsigned short val_nneighbor)
Set the number of neighbor (artificial dissipation).
unsigned long GetPoint(unsigned short val_point)
Get all the points that compose the control volume.
unsigned long GetGlobalIndex(void)
Get the global index in a parallel computation.
unsigned short GetnPoint(void)
Get the number of points that compose the control volume.
Main class for defining the PDE solution, it requires a child class for each particular solver (Euler...
void AddRes_Max_BGS(unsigned short val_var, su2double val_residual, unsigned long val_point, su2double *val_coord)
Adds the maximal residual for BGS subiterations.
unsigned short nPrimVarGrad
Number of primitive variables of the problem in the gradient computation.
su2double ** Jacobian_j
Auxiliary matrices for storing point to point Jacobians at point j.
su2double * Residual_Max_BGS
Vector with the maximal residual for each variable for BGS subiterations.
void SetRes_BGS(unsigned short val_var, su2double val_residual)
Set the residual for BGS subiterations.
su2double ** Cvector
Auxiliary structure for computing gradients by least-squares.
CSysMatrix Jacobian
Complete sparse Jacobian structure for implicit computations.
CSysVector LinSysRes
vector to store iterative residual of implicit linear system.
su2double * Residual_j
Auxiliary nVar vector for storing the residual at point j.
unsigned short nDim
Number of dimensions of the problem.
su2double ** Jacobian_i
Auxiliary matrices for storing point to point Jacobians at point i.
virtual void SetRoe_Dissipation(CGeometry *geometry, CConfig *config)
A virtual member.
su2double Min_Delta_Time
Minimum value of the delta time for all the control volumes.
su2double * Residual_RMS
Vector with the mean residual for each variable.
su2double * Residual_i
Auxiliary nVar vector for storing the residual at point i.
void AddRes_RMS(unsigned short val_var, su2double val_residual)
Adds the maximal residual, this is useful for the convergence history.
void Read_SU2_Restart_Metadata(CGeometry *geometry, CConfig *config, bool adjoint_run, string val_filename)
Read the metadata from a native SU2 restart file (ASCII or binary).
virtual void SetOmega_Max(su2double val_omega_max)
A virtual member.
int * Restart_Vars
Auxiliary structure for holding the number of variables and points in a restart.
su2double * Res_Conv
Auxiliary nVar vector for storing the convective residual.
su2double * Res_Sour
Auxiliary nVar vector for storing the viscous residual.
void SetIterLinSolver(unsigned short val_iterlinsolver)
Set number of linear solver iterations.
unsigned long nPoint
Number of points of the computational grid.
su2double ** Smatrix
Auxiliary structure for computing gradients by least-squares.
CSysVector LinSysSol
vector to store iterative solution of implicit linear system.
virtual void Preprocessing(CGeometry *geometry, CSolver **solver_container, CConfig *config, unsigned short iMesh, unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output)
A virtual member.
unsigned short nSecondaryVarGrad
Number of primitive variables of the problem in the gradient computation.
virtual void LoadRestart(CGeometry **geometry, CSolver ***solver, CConfig *config, int val_iter, bool val_update_geo)
A virtual member.
su2double ** Point_Max_Coord
Vector with pointers to the coords of the maximal residual for each variable.
su2double ** Point_Max_Coord_BGS
Vector with pointers to the coords of the maximal residual for each variable.
su2double * Res_Visc
Auxiliary nVar vector for storing the viscous residual.
unsigned short nVar
Number of variables of the problem.
void SetRes_RMS(unsigned short val_var, su2double val_residual)
Set the maximal residual, this is useful for the convergence history.
su2double * Vector
Auxiliary nDim vector.
unsigned long * Point_Max
Vector with the maximal residual for each variable.
void SetResidual_RMS(CGeometry *geometry, CConfig *config)
Set the value of the max residual and RMS residual.
void Read_SU2_Restart_Binary(CGeometry *geometry, CConfig *config, string val_filename)
Read a native SU2 restart file in binary format.
su2double * Residual_Max
Vector with the maximal residual for each variable.
virtual void SetStrainMag_Max(su2double val_strainmag_max)
A virtual member.
void AddRes_Max(unsigned short val_var, su2double val_residual, unsigned long val_point, su2double *val_coord)
Adds the maximal residual, this is useful for the convergence history.
su2double Max_Delta_Time
Maximum value of the delta time for all the control volumes.
CVariable ** node
Vector which the define the variables for each problem.
void AddRes_BGS(unsigned short val_var, su2double val_residual)
Adds the residual for BGS subiterations.
su2double * Solution
Auxiliary nVar vector.
unsigned long nPointDomain
Number of points of the computational grid.
su2double * Solution_j
Auxiliary nVar vector for storing the solution at point j.
su2double * Solution_i
Auxiliary nVar vector for storing the solution at point i.
su2double * Residual_BGS
Vector with the mean residual for each variable for BGS subiterations.
su2double * Residual
Auxiliary nVar vector.
unsigned short nPrimVar
Number of primitive variables of the problem.
virtual void Set_MPI_Solution_Old(CGeometry *geometry, CConfig *config)
Set number of linear solver iterations.
virtual void Set_MPI_Solution(CGeometry *geometry, CConfig *config)
Set number of linear solver iterations.
void Read_SU2_Restart_ASCII(CGeometry *geometry, CConfig *config, string val_filename)
Read a native SU2 restart file in ASCII format.
passivedouble * Restart_Data
Auxiliary structure for holding the data values from a restart.
void SetResidual_BGS(CGeometry *geometry, CConfig *config)
Communicate the value of the max residual and RMS residual.
virtual su2double GetTke_Inf(void)
A virtual member.
void SetRes_Max(unsigned short val_var, su2double val_residual, unsigned long val_point)
Set the maximal residual, this is useful for the convergence history.
unsigned long * Point_Max_BGS
Vector with the maximal residual for each variable.
void SetRes_Max_BGS(unsigned short val_var, su2double val_residual, unsigned long val_point)
Set the maximal residual for BGS subiterations.
su2double * Vector_i
Auxiliary nDim vector to do the reconstruction of the variables at point i.
su2double * Vector_j
Auxiliary nDim vector to do the reconstruction of the variables at point j.
unsigned short nVarGrad
Number of variables for deallocating the LS Cvector.
unsigned short nSecondaryVar
Number of primitive variables of the problem.
void SubtractBlock(unsigned long block_i, unsigned long block_j, su2double **val_block)
Subtracts the specified block to the sparse matrix.
unsigned short BuildLineletPreconditioner(CGeometry *geometry, CConfig *config)
Build the Linelet preconditioner.
void Initialize(unsigned long nPoint, unsigned long nPointDomain, unsigned short nVar, unsigned short nEqn, bool EdgeConnect, CGeometry *geometry, CConfig *config)
Initializes space matrix system.
void DeleteValsRowi(unsigned long i)
Deletes the values of the row i of the sparse matrix.
void AddVal2Diag(unsigned long block_i, su2double val_matrix)
Adds the specified value to the diagonal of the (i, i) subblock of the matrix-by-blocks structure.
void AddBlock(unsigned long block_i, unsigned long block_j, su2double **val_block)
Adds the specified block to the sparse matrix.
void SetValZero(void)
Sets to zero all the entries of the sparse matrix.
void SetVal2Diag(unsigned long block_i, su2double val_matrix)
Sets the specified value to the diagonal of the (i, i) subblock of the matrix-by-blocks structure.
Class for solving linear systems using classical and Krylov-subspace iterative methods.
unsigned long Solve(CSysMatrix &Jacobian, CSysVector &LinSysRes, CSysVector &LinSysSol, CGeometry *geometry, CConfig *config)
Solve the linear system using a Krylov subspace method.
void AddBlock(unsigned long val_ipoint, su2double *val_residual)
Add val_residual to the residual.
su2double * GetBlock(unsigned long val_ipoint)
Get the value of the residual.
void SubtractBlock(unsigned long val_ipoint, su2double *val_residual)
Subtract val_residual to the residual.
void SetBlock_Zero(unsigned long val_ipoint)
Set the residual to zero.
void Initialize(const unsigned long &numBlk, const unsigned long &numBlkDomain, const unsigned short &numVar, const su2double &val=0.0)
Initialize the class.
su2double GetRelAngularCoord(void)
get angular coord.
su2double GetDeltaAngularCoord(void)
get angular coord.
void GetTurboNormal(su2double *val_normal)
Copy the the turbo normal vector of a face.
su2double GetArea(void)
get face Area associate to the vertex.
unsigned long GetOldVertex(void)
retrieve vertex value not ordered.
Child class for defining the Van der Waals model.
Main class for defining the variables.
virtual su2double GetProjVel(su2double *val_vector)
A virtual member.
virtual su2double GetTemperature(void)
A virtual member.
virtual su2double GetSecondary(unsigned short val_var)
A virtual member.
virtual void SetPreconditioner_Beta(su2double val_Beta)
Set the value of the preconditioner Beta.
virtual void SetVel_ResTruncError_Zero(unsigned short iSpecies)
Set the velocity of the truncation error to zero.
su2double GetMax_Lambda_Inv(void)
Get the value of the maximum eigenvalue for the inviscid terms of the PDE.
su2double GetSolution_Max(unsigned short val_var)
Get the value of the min solution.
su2double * GetUndivided_Laplacian(void)
Get the undivided laplacian of the solution.
virtual su2double GetHarmonicBalance_Source(unsigned short val_var)
A virtual member.
su2double * GetSolution_time_n1(void)
Get the solution at time n-1.
void AddMax_Lambda_Inv(su2double val_max_lambda)
Add a value to the maximum eigenvalue for the inviscid terms of the PDE.
virtual su2double GetGradient_Primitive(unsigned short val_var, unsigned short val_dim)
A virtual member.
virtual su2double GetLimiter_Primitive(unsigned short val_var)
A virtual member.
void SetMax_Lambda_Visc(su2double val_max_lambda)
Set the value of the maximum eigenvalue for the viscous terms of the PDE.
su2double GetSensor(void)
Get the pressure sensor.
virtual su2double GetSoundSpeed(void)
A virtual member.
void SetSolution(su2double *val_solution)
Set the value of the solution.
virtual void SetRoe_Dissipation_FD(su2double val_wall_dist)
A virtual member.
virtual su2double GetVelocity(unsigned short val_dim)
A virtual member.
virtual void SetRoe_Dissipation_NTS(su2double val_delta, su2double val_const_DES)
A virtual member.
su2double GetMax_Lambda_Visc(void)
Get the value of the maximum eigenvalue for the viscous terms of the PDE.
virtual su2double GetDensity(void)
A virtual member.
void SetSensor(su2double val_sensor)
Set pressure sensor.
virtual su2double GetEnthalpy(void)
A virtual member.
virtual void Set_BGSSolution_k(void)
A virtual member. Set the value of the old geometry solution (adjoint).
virtual su2double GetEddyViscosity(void)
A virtual member.
su2double GetSolution(unsigned short val_var)
Get the solution.
virtual su2double GetPrimitive(unsigned short val_var)
A virtual member.
su2double * GetResTruncError(void)
Get the truncation error.
virtual su2double * GetWindGust()
Get the value of the wind gust.
virtual su2double GetVelocity2(void)
A virtual member.
virtual bool SetStrainMag(void)
A virtual member.
virtual bool SetVorticity(void)
A virtual member.
void SetTranspiration(su2double val)
virtual void SetDES_LengthScale(su2double val_des_lengthscale)
A virtual member.
virtual void AddSolution_New(unsigned short val_var, su2double val_solution)
A virtual member.
virtual su2double GetDES_LengthScale(void)
A virtual member.
su2double GetTranspiration(void)
void AddSolution(unsigned short val_var, su2double val_solution)
Add a value to the solution.
su2double GetNon_Physical(void)
Get the value of the non-physical point.
virtual void SetTauWall(su2double val_tau_wall)
virtual su2double GetEnergy(void)
A virtual member.
void AddLambda(su2double val_lambda)
Add the value of the spectral radius.
su2double GetLambda(void)
Get the value of the spectral radius.
virtual su2double GetRoe_Dissipation(void)
A virtual member.
virtual su2double Get_BGSSolution_k(unsigned short iDim)
A virtual member. Get the value of the old geometry solution (adjoint).
virtual su2double GetPressure(void)
A virtual member.
virtual su2double GetTauWall()
virtual su2double * GetVorticity(void)
A virtual member.
void SetDelta_Time(su2double val_delta_time)
Set the value of the time step.
virtual void SetVelocity_Old(su2double *val_velocity)
A virtual member.
virtual void SetLimiter_Primitive(unsigned short val_var, su2double val_value)
A virtual member.
su2double GetSolution_Min(unsigned short val_var)
Get the value of the min solution.
su2double GetDelta_Time(void)
Get the value of the time step.
virtual void SubtractGradient_Primitive(unsigned short val_var, unsigned short val_dim, su2double val_value)
A virtual member.
void SetSolution_Old(su2double *val_solution_old)
Set the value of the old solution.
void Set_Solution_time_n1(void)
Set the variable solution at time n-1.
void SetMax_Lambda_Inv(su2double val_max_lambda)
Set the value of the maximum eigenvalue for the inviscid terms of the PDE.
virtual su2double GetmuT(void)
Get the value of the eddy viscosity.
void SetSolution_Min(unsigned short val_var, su2double val_solution)
Set the value of the min solution.
void SetSolution_Max(unsigned short val_var, su2double val_solution)
Set the value of the max solution.
virtual void SetSecondaryVar(CFluidModel *FluidModel)
A virtual member.
virtual void SetRoe_Dissipation(su2double val_dissipation)
A virtual member.
void Set_Solution_time_n(void)
Set the variable solution at time n.
virtual bool SetPrimVar(CConfig *config)
A virtual member.
su2double * GetSolution_time_n(void)
Get the solution at time n.
virtual su2double * GetWindGustDer()
Get the value of the derivatives of the wind gust.
void SetNon_Physical(bool val_value)
Set the value of the non-physical point.
virtual su2double GetLaminarViscosity(void)
A virtual member.
virtual void SetGradient_Primitive(unsigned short val_var, unsigned short val_dim, su2double val_value)
A virtual member.
void SetLambda(su2double val_lambda)
Set the value of the spectral radius.
virtual su2double GetStrainMag(void)
A virtual member.
void GetNormal(su2double *val_normal)
Copy the the normal vector of a face.
long GetDonorProcessor(void)
Get the value of the periodic point of a vertex.
short GetRotation_Type(void)
Get the type of rotation associated to the vertex.
long GetDonorVertex(void)
Get the value of the periodic point of a vertex.
unsigned long GetNormal_Neighbor(void)
Get the value of the closest neighbor.
unsigned long GetNode(void)
Get the node of the vertex.
long GetDonorMarker(void)
Get the value of the periodic point of a vertex.
codi::RealForward su2double
const su2double eps
machine epsilon
#define MPI_UNSIGNED_LONG
#define MPI_UNSIGNED_SHORT
void StartPreacc()
Starts a new preaccumulation section and sets the input variables.
void EndPreacc()
Ends a preaccumulation section and computes the local Jacobi matrix of a code section using the varia...
void SetPreaccIn(const su2double &data)
Sets the scalar input of a preaccumulation section.
void SetPreaccOut(su2double &data)
Sets the scalar output of a preaccumulation section.
void SetDerivative(su2double &data, const double &val)
Set the derivative value of the datatype (needs to be implemented for each new type).
double GetSecondary(const su2double &data)
Get the secondary value of the datatype (needs to be implemented for each new type).
int Int(const su2double &data)
Casts the primitive value to int (uses GetValue, already implemented for each type).
const int MASTER_NODE
Master node for MPI parallelization.
const su2double PI_NUMBER
Pi number.
@ NO_HYBRIDRANSLES
No turbulence model.
@ NO
Boolean definition of no.
@ YES
Boolean definition of yes.
@ TURKEL
Roe-Turkel's upwind numerical method.
@ ROE
Roe's upwind numerical method.
@ BARTH_JESPERSEN
Slope limiter using Barth-Jespersen method (stencil formulation).
@ VENKATAKRISHNAN
Slope limiter using Venkatakrisnan method (stencil formulation).
@ VENKATAKRISHNAN_WANG
Slope limiter using Venkatakrisnan method, eps based on solution (stencil formulation).
@ VAN_ALBADA_EDGE
Slope limiter using Van Albada method (edge formulation).
@ D_AOA
Derivative with respect to the angle of attack.
@ D_TEMPERATURE
Derivative with respect to the freestream temperature.
@ D_PRESSURE
Derivative with respect to the freestream pressure.
@ D_MACH
Derivative with respect to the mach number.
const su2double STANDARD_GRAVITY
Acceleration due to gravity at surface of earth.
@ SMOOTHER_LINELET
Linelet smoother.
@ EULER_IMPLICIT
Implicit Euler time integration definition.
const su2double EPS
Error scale.
const int FLOW_SOL
Position of the mean flow solution in the solver container array.
@ SPACE_CENTERED
Space centered convective numerical method.
@ CONSTANT_CONDUCTIVITY
_____.
@ VARIABLES_JUMP
User specifies the variables jump.
@ POWER
User specifies the power.
@ BC_THRUST
User specifies the BC thrust.
@ DRAG_MINUS_THRUST
User specifies the D-T.
@ NET_THRUST
User specifies the Net thrust.
@ MASSFLOW
User specifies the massflow.
@ JST
Jameson-Smith-Turkel centered numerical method.
const unsigned int MESH_0
Definition of the finest grid level.
@ TOTAL_HEATFLUX
Total heat flux.
@ FORCE_Y_COEFFICIENT
Y-direction force objective function definition.
@ SURFACE_MASSFLOW
Mass Flow Rate objective function definition.
@ TORQUE_COEFFICIENT
Torque objective function definition.
@ SURFACE_MACH
Mach number objective function definition.
@ MAXIMUM_HEATFLUX
Maximum heat flux.
@ THRUST_COEFFICIENT
Thrust objective function definition.
@ SURFACE_MOM_DISTORTION
Momentum distortion objective function definition.
@ BLOWING_COEFFICIENT
Jet blowing coefficient objective function definition.
@ SURFACE_SECOND_OVER_UNIFORM
Secondary over uniformity (relative secondary strength) objective function definition.
@ BUFFET_SENSOR
Sensor for detecting separation.
@ MOMENT_X_COEFFICIENT
Pitching moment objective function definition.
@ SIDEFORCE_COEFFICIENT
Side force objective function definition.
@ LIFT_COEFFICIENT
Lift objective function definition.
@ INVERSE_DESIGN_HEATFLUX
Heat flux objective function definition (inverse design).
@ SURFACE_SECONDARY
Secondary flow strength objective function definition.
@ INVERSE_DESIGN_PRESSURE
Pressure objective function definition (inverse design).
@ EFFICIENCY
Efficiency objective function definition.
@ FORCE_Z_COEFFICIENT
Z-direction force objective function definition.
@ DRAG_COEFFICIENT
Drag objective function definition.
@ NEARFIELD_PRESSURE
NearField Pressure objective function definition.
@ SURFACE_TOTAL_PRESSURE
Total Pressure objective function definition.
@ MOMENT_Y_COEFFICIENT
Rolling moment objective function definition.
@ FORCE_X_COEFFICIENT
X-direction force objective function definition.
@ CUSTOM_OBJFUNC
Custom objective function definition.
@ EQUIVALENT_AREA
Equivalent area objective function definition.
@ FIGURE_OF_MERIT
Rotor Figure of Merit objective function definition.
@ SURFACE_STATIC_PRESSURE
Static Pressure objective function definition.
@ SURFACE_UNIFORMITY
Flow uniformity objective function definition.
@ MOMENT_Z_COEFFICIENT
Yawing objective function definition.
@ NO_WALL_FUNCTION
No wall function treatment, integration to the wall. Default behavior.
@ STATIC_SUPERSONIC_INFLOW_PD
User specifies static pressure, static temperature, and Mach components.
@ TOTAL_CONDITIONS_PT
User specifies total pressure, total temperature, and flow direction.
@ MIXING_OUT
User does not specify anything information are retrieved from the other domain.
@ DENSITY_VELOCITY
User specifies density and velocity, and flow direction.
@ MIXING_IN
User does not specify anything information are retrieved from the other domain.
@ STATIC_PRESSURE
User specifies static pressure.
@ STATIC_SUPERSONIC_INFLOW_PT
User specifies static pressure, static temperature, and Mach components.
@ HARMONIC_BALANCE
Use a harmonic balance source term.
@ DT_STEPPING_1ST
Use a dual time stepping strategy for unsteady computations (1st order).
@ TIME_STEPPING
Use a time stepping strategy for unsteady computations.
@ DT_STEPPING_2ND
Use a dual time stepping strategy for unsteady computations (2nd order).
@ STEADY
A steady computation.
const int TURB_SOL
Position of the turbulence model solution in the solver container array.
@ RUNTIME_FLOW_SYS
One-physics case, the code is solving the flow equations(Euler and Navier-Stokes).
@ RANS
Definition of the Reynolds-averaged Navier-Stokes' (RANS) solver.
@ ADJ_RANS
Definition of the continuous adjoint Reynolds-averaged Navier-Stokes' (RANS) solver.
@ NTS
Numerical Blending of Travin and Shur.
@ NO_ROELOWDISS
No Roe Low Dissipation model.
@ NTS_DUCROS
Numerical Blending of Travin and Shur + Ducros' Shock Sensor.
@ FD_DUCROS
Numerical Blending based on DDES's F_d function + Ducros' Shock Sensor.
@ FD
Numerical Blending based on DDES's F_d function.
@ CONSTANT_VISCOSITY
_____.
const su2double TWO3
Two divided by three.
@ RATIO
Jump given by a ratio.
@ ENGINE_EXHAUST
Boundary nacelle exhaust.
@ INTERNAL_BOUNDARY
Internal Boundary definition.
@ EULER_WALL
Boundary Euler wall definition.
@ ISOTHERMAL
No slip isothermal wall boundary condition.
@ TRANSPIRATION
Transpiration definition.
@ SEND_RECEIVE
Boundary send-receive definition.
@ INLET_FLOW
Boundary inlet flow definition.
@ ACTDISK_OUTLET
Actuator disk outlet boundary definition.
@ OUTLET_FLOW
Boundary outlet flow definition.
@ ENGINE_INFLOW
Boundary nacelle inflow.
@ HEAT_FLUX
No slip constant heat flux wall boundary condition.
@ FLUID_INTERFACE
Domain interface definition.
@ NEARFIELD_BOUNDARY
Near-Field boundary definition.
@ INTERFACE_BOUNDARY
Domain interface boundary definition.
@ ACTDISK_INLET
Actuator disk inlet boundary definition.
@ PERIODIC_BOUNDARY
Periodic boundary definition.
@ MASSFLUX
a mass flow average is computed at the boundary of interest.
@ AREA
an area average is computed at the boundary of interest.
@ MIXEDOUT
an mixed-out average is computed at the boundary of interest.
@ ALGEBRAIC
an algebraic average is computed at the boundary of interest.
@ LINELET
Line implicit preconditioner.
@ MASS_FLOW
User specifies density and velocity (mass flow).
@ TOTAL_CONDITIONS
User specifies total pressure, total temperature, and flow direction.
@ FREESTREAM_PRESS_EQ_ONE
Non-dimensional compressible simulation with freestream pressure equal to 1.0.
@ DIMENSIONAL
Dimensional simulation (compressible or incompressible).
@ FREESTREAM_VEL_EQ_MACH
Non-dimensional compressible simulation with freestream velocity equal to Mach number.
@ FREESTREAM_VEL_EQ_ONE
Non-dimensional compressible simulation with freestream pressure equal to 1.0.
@ INFLOW
flag for inflow marker for compute turboperformance.
@ OUTFLOW
flag for outflow marker for compute turboperformance.
const unsigned int NO_RK_ITER
No Runge-Kutta iteration.
@ FAN_FACE_PRESSURE
User specifies Static pressure.
@ FAN_FACE_MACH
User specifies fan face mach number.
@ FAN_FACE_MDOT
User specifies Static pressure.
@ SST
Kind of Turbulence model (Menter SST).
@ SA_NEG
Kind of Turbulent model (Spalart-Allmaras).
@ SA
Kind of Turbulent model (Spalart-Allmaras).
@ VERB_HIGH
High level of verbosity.
@ WEIGHTED_LEAST_SQUARES
Gradients computation using Weighted Least Squares.
@ GREEN_GAUSS
Gradients computation using Green Gauss theorem.
@ US
Definition of incompressible solver.
@ SI
Definition of compressible solver.
@ UPDATE
Update geometry structure (grid moving, adaptation, etc.).